Description
CS610 – Assignment 5
Shivam Sharma (210983, sshivam21@iitk.ac.in)
The testing has been performed on my own device, which has 12 logical cores.
1 Problem 1
1.1 Compilation and Running Instructions
Run make in the problem directory, this should give two executables, problem1.out for the driver code and unt_test.out for the unit tests.
• To run the driver code, pass the following cmd args,
– ops = Total Number of Operations.
– rns = Total Runs.
– add = %age of insertions.
– rem = %age of deletions.
– thr = Number of threads doing the batch operations. – hsh = One of 0, 1 or 2, which hash function to use.
• To run the unit tests, simply run the executable.
1.2 Results
1.2.1 Throughput of Kernels
The following throughput values were obtained with 16 threads and using the Knuth Hash(hsh = 2).
Kernel Pthread Implementation(ops/ms) TBB HashTable(ops/ms)
Insert 15564 444444
Delete 53191 161290
Search 51546 121951
Table 1: Results on threads = 16
1.2.2 Comparision of Hash Functions
I have compared three different hash functions, all definitions are in hash-table.h,
Kernel SimpleDoubleHash(ops/ms) BitwiseHash(ops/ms) KnuthHash(ops/ms)
Insert 14776 14652 15564
Delete 13774 44444 53191
Search 13623 44642 51546
Table 2: Results on threads = 16
The KnuthHash(hsh = 2) performs the best accross all kernels, with significant advantage in delete and search kernels.
2 Problem 2
2.1 Compilation Instructions
Run make in the problem directory, this should give two executables, main.out for the benchmarks and unit_test.out for unit tests.
• To run the benchmark, pass the following cmd args,
– ops = Number of total operations.
– rns = Number of total runs.
– thr = Number of total threads issuing the operations.
• To run the unit test, simply run the executable, the number of operations and verboseness can be changed in the code.
2.2 Results
Number of Operations Time(ms)
1e5 8.5
1e6 62.5
1e7 495.5
Table 3: Results on threads = 4
Number of Threads Time(ms) Scalability
1 32 1
2 40 0.8
4 43 0.74
8 50 0.64
16 60 0.53
Table 4: Results on Ops = 1e6
2
Reviews
There are no reviews yet.