Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified figures/intel_xeon_evolution.pdf
Binary file not shown.
Binary file added figures/tcp_all_cores_perf.pdf
Binary file not shown.
Binary file added figures/tcp_combined_perf.pdf
Binary file not shown.
Binary file removed figures/tcp_cpus_perf.pdf
Binary file not shown.
Binary file modified figures/tcp_cpus_tdp.pdf
Binary file not shown.
Binary file added figures/tcp_one_core_perf.pdf
Binary file not shown.
Binary file modified figures/tpc_cpus_spec_perf_tdp.pdf
Binary file not shown.
5 changes: 5 additions & 0 deletions intel_cpus_filtered.csv

Large diffs are not rendered by default.

Binary file added notebooks/.DS_Store
Binary file not shown.
194 changes: 194 additions & 0 deletions notebooks/extract_cpus_from_tpc.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Input:\n",
"- tpc_cpu.csv (manually created by DES team, based on TPC-C and TPC-Hv2 (SF 1000) result data.)\n",
"### Output:\n",
"- tpc_xeon.csv\n",
"- tpc_sku.csv"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install pandas duckdb matplotlib seaborn\n",
"\n",
"import pandas as pd\n",
"import duckdb\n",
"import os\n",
"import matplotlib.pyplot as plt\n",
"import re\n",
"import seaborn as sns\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"file_path = '../tpc_cpu.csv'\n",
"if os.path.exists(file_path):\n",
" df = pd.read_csv(file_path, sep=\",\")\n",
"else:\n",
" raise FileNotFoundError(f\"The file {file_path} does not exist.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def extract_performance_id(name):\n",
" match = re.search(r'\\d{4}', name)\n",
" if match:\n",
" return match.group(0)[-2:]\n",
" return None\n",
"\n",
"def extract_sku_level(name):\n",
" match = re.search(r'\\d{4}', name)\n",
" if match:\n",
" return int(match.group(0)[0])\n",
" return None"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Clean / add data\n",
"print(\"TPC result count\", len(df))\n",
"df = df[df['model'].str.contains('xeon', case=False, na=False)]\n",
"print(\"TPC result count with XEON CPUs\", len(df))\n",
"df['performance_id'] = df['model'].apply(extract_performance_id)\n",
"df['sku_level'] = df['model'].apply(extract_sku_level)\n",
"# display(df)\n",
"# df = df[df['sku_level'] != '']\n",
"display(df)\n",
"df.to_csv(\"../tpc_sku.csv\", header=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"sku_counts = df['sku_level'].value_counts().sort_index()\n",
"\n",
"# Creating the bar plot\n",
"plt.figure(figsize=(10, 3))\n",
"sku_counts.plot(kind='bar')\n",
"\n",
"# Adding titles and labels\n",
"plt.title('Occurrences of sku_level')\n",
"plt.xlabel('SKU Level')\n",
"plt.ylabel('Number of Occurrences')\n",
"\n",
"# Setting y-axis to show only integer values\n",
"plt.yticks(np.arange(0, sku_counts.max() + 1, 1))\n",
"\n",
"# Displaying the plot\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"sku_counts = df['performance_id'].value_counts().sort_index()\n",
"\n",
"# Creating the bar plot\n",
"plt.figure(figsize=(6, 2))\n",
"sku_counts.plot(kind='bar')\n",
"\n",
"# Adding titles and labels\n",
"plt.title('Occurrences of performance_id')\n",
"plt.xlabel('Perf ID')\n",
"plt.ylabel('Number of Occurrences')\n",
"\n",
"# Setting y-axis to show only integer values\n",
"plt.yticks(np.arange(0, sku_counts.max() + 1, 1))\n",
"\n",
"# Displaying the plot\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df.to_csv(\"../tpc_xeon.csv\")\n",
"cpu_models = df['model']\n",
"cpu_models.to_csv(\"../tpc_xeon_names.csv\")\n",
"\n",
"# Filter with sku level\n",
"df = df[df['sku_level'] >= 5]\n",
"\n",
"sku_counts = df['performance_id'].value_counts().sort_index()\n",
"\n",
"# Creating the bar plot\n",
"plt.figure(figsize=(6, 2))\n",
"sku_counts.plot(kind='bar')\n",
"\n",
"# Adding titles and labels\n",
"plt.title('Occurrences of performance_id')\n",
"plt.xlabel('Perf ID')\n",
"plt.ylabel('Number of Occurrences')\n",
"\n",
"# Setting y-axis to show only integer values\n",
"plt.yticks(np.arange(0, sku_counts.max() + 1, 1))\n",
"\n",
"# Displaying the plot\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# con = duckdb.connect(\"../spec.db\") # assumes DuckDB DB \"spec.db\" in root dir\n",
"# con.sql(\"DROP TABLE IF EXISTS spec\")\n",
"# con.sql(\"CREATE TABLE spec AS SELECT * FROM df_combined\")\n",
"# con.close()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
564 changes: 0 additions & 564 deletions notebooks/intel_cpus.ipynb

This file was deleted.

Loading