Okay. As suggested by Alexander, I have changed the order of reading and doing initdb for each pgbench run. With these changes, I got following results at 300 scale factor with 8GB of shared buffer.
pgbench settings:pgbench -i -s 300 postgres
pgbench -M prepared -c $thread -j $thread -T $time_for_reading postgres
where, time_for_reading = 30mins
non default GUC paramshared_buffers=8GB
max_connections=300
pg_xlog is located in SSD.
CLIENT COUNT | TPS (HEAD) | TPS (PATCH) | % IMPROVEMENT |
4 | 2803 | 2843 | 1.427042455 |
8 | 5315 | 5225 | -1.69332079 |
32 | 19755 | 19669 | -0.4353328271 |
64 | 28679 | 27980 | -2.437323477 |
128 | 28887 | 28008 | -3.042891266 |
156 | 27465 | 26728 | -2.683415256 |
180 | 27425 | 26697 | -2.654512306 |
196 | 28826 | 27396 | -4.960799278 |
256 | 29787 | 28107 | -5.640044315 |
The test machine details are as follows,
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 128
On-line CPU(s) list: 0-127
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 8
NUMA node(s): 8
Vendor ID: GenuineIntel
CPU family: 6
Model: 47
Model name: Intel(R) Xeon(R) CPU E7- 8830 @ 2.13GHz
Also, Excel sheet (results-readwrite-300-SF) containing the results for all the 3 runs is attached.