Skip to content

Commit

Permalink
benchmark update
Browse files Browse the repository at this point in the history
  • Loading branch information
kkli08 committed Oct 4, 2024
1 parent 5baa518 commit 222e744
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 37 deletions.
56 changes: 22 additions & 34 deletions Benchmark/put_throughput/macos_put_throughput.csv
Original file line number Diff line number Diff line change
@@ -1,37 +1,25 @@
MemtableSizeMB,DataSizeMB,Throughput(MB/s)
25,1,inf
25,2,inf
25,4,inf
25,8,8000
5,16,4000
5,32,4571.43
5,64,4571.43
5,128,4129.03
5,256,3710.14
5,512,3324.68
5,1024,239.141
5,2048,162.604
25,16,5333.33
25,32,4571.43
25,64,4571.43
25,128,4000
25,256,3710.14
25,512,3531.03
25,32,5333.33
25,64,4266.67
25,128,3878.79
25,256,3657.14
25,512,3436.24
25,1024,3250.79
25,2048,3065.87
50,1,inf
50,2,inf
50,4,inf
50,8,8000
50,16,5333.33
50,32,4571.43
50,64,4266.67
50,128,4000
50,256,3657.14
50,512,3436.24
50,1024,3240.51
50,2048,3047.62
100,1,inf
100,2,inf
100,4,inf
100,8,8000
100,16,5333.33
100,32,4571.43
100,64,4000
100,128,3878.79
100,256,3555.56
100,512,3324.68
100,1024,3170.28
100,2048,3056.72
25,2048,3056.72
125,16,5333.33
125,32,4571.43
125,64,4000
125,128,3878.79
125,256,3657.14
125,512,3436.24
125,1024,3240.51
125,2048,3061.29
2 changes: 1 addition & 1 deletion Benchmark/put_throughput/plot_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
plt.ylabel('Throughput (MB/s)')

# Set custom x-axis values and labels
x_ticks = [2 ** i for i in range(1, 10)] # Use 2, 4, 8, 16, 32, ..., 512
x_ticks = [2 ** i for i in range(3, 13)] # Use 2, 4, 8, 16, 32, ..., 512
ax = plt.gca() # Get current axis
ax.set_xscale('log', base=2) # Set log scale for x-axis to maintain equal spacing

Expand Down
4 changes: 2 additions & 2 deletions Benchmark/put_throughput_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using namespace std::chrono;

// Constants for benchmark
constexpr size_t MB = 1024 * 1024 / 128; // 1MB in bytes
constexpr size_t START_DATA_SIZE_MB = 1; // Start with 1 MB
constexpr size_t START_DATA_SIZE_MB = 16; // Start with 1 MB
constexpr size_t END_DATA_SIZE_MB = 2048; // End with 512 MB (adjust as needed)
const std::string DB_NAME = "benchmark_db";

Expand Down Expand Up @@ -92,7 +92,7 @@ int main() {
csvFile << "MemtableSizeMB,DataSizeMB,Throughput(MB/s)\n";

// Benchmark configurations
std::vector<size_t> memtableSizes = {25 * MB, 50 * MB, 100 * MB}; // Memtable sizes: 25MB, 50MB, 100MB
std::vector<size_t> memtableSizes = {5 * MB, 25 * MB, 125 * MB}; // Memtable sizes: 25MB, 50MB, 100MB

// Run benchmarks for each Memtable size and data size
for (auto memtableSize : memtableSizes) {
Expand Down

0 comments on commit 222e744

Please sign in to comment.