Advertisement
Tut_

RAID stripe & PG performance

Jul 4th, 2013
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.84 KB | None | 0 0
  1. FreeBSD 9.1-STABLE amd64 GENERIC
  2.  
  3. CPU: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz (2000.04-MHz K8-class CPU)
  4. Origin = "GenuineIntel" Id = 0x206d7 Family = 0x6 Model = 0x2d Stepping = 7
  5. Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  6. Features2=0x1fbee3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX>
  7. AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  8. AMD Features2=0x1<LAHF>
  9. TSC: P-state invariant, performance statistics
  10. real memory = 25769803776 (24576 MB)
  11. avail memory = 24742514688 (23596 MB)
  12.  
  13. FreeBSD/SMP: Multiprocessor System Detected: 24 CPUs
  14. FreeBSD/SMP: 2 package(s) x 6 core(s) x 2 SMT threads
  15.  
  16.  
  17. PostgreSQL 9.1.9 (block_size = 8 KB - default)
  18.  
  19. =========================================================================
  20. # mfiutil show adapter
  21.  
  22. mfi0 Adapter:
  23. Product Name: ServeRAID M5110e
  24. Serial Number: 2CL1CD
  25. Firmware: 23.7.1-0010
  26. RAID Levels: JBOD, RAID0, RAID1, RAID5, RAID6, RAID10, RAID50
  27. Battery Backup: present
  28. NVRAM: 32K
  29. Onboard Memory: 512M
  30. Minimum Stripe: 8k
  31. Maximum Stripe: 1M
  32.  
  33.  
  34. # mfiutil show volumes
  35.  
  36. mfi0 Volumes:
  37. Id Size Level Stripe State Cache Name
  38. mfid0 ( 557G) RAID-1 1M OPTIMAL Reads <TEST>
  39.  
  40.  
  41. # mfiutil show config
  42.  
  43. mfi0 Configuration: 2 arrays, 1 volumes, 0 spares
  44. array 0 of 2 drives:
  45. drive 6 ( 279G) ONLINE <HITACHI HUS156030VLS600 A5D0 serial=JTVDL28L> SCSI-6
  46. drive 7 ( 279G) ONLINE <HITACHI HUS156030VLS600 A5D0 serial=LVY9SJVN> SCSI-6
  47. array 1 of 2 drives:
  48. drive 5 ( 279G) ONLINE <HITACHI HUS156030VLS600 A5D0 serial=J0YPP62N> SCSI-6
  49. drive 8 ( 279G) ONLINE <HITACHI HUS156030VLS600 A5D0 serial=J0YSE4GN> SCSI-6
  50. volume mfid0 (557G) RAID-1 1M OPTIMAL <TEST> spans:
  51. array 0
  52. array 1
  53.  
  54.  
  55. # mfiutil cache 0
  56.  
  57. mfi0 volume mfid0 cache settings:
  58. I/O caching: writes and reads
  59. write caching: write-back
  60. write cache with bad BBU: disabled
  61. read ahead: adaptive
  62. drive write cache: disabled
  63.  
  64. -------------------------------------------------------------------------
  65. # dumpfs /dev/mfid0s1e
  66.  
  67. magic 19540119 (UFS2) time Thu Jul 4 22:39:34 2013
  68. superblock location 65536 id [ 51d4bc0b a09bda61 ]
  69. ncg 220 size 70638592 blocks 69528015
  70. bsize 65536 shift 16 mask 0xffff0000
  71. fsize 8192 shift 13 mask 0xffffe000
  72. frag 8 shift 3 fsbtodb 4
  73. minfree 8% optim time symlinklen 120
  74. maxbsize 65536 maxbpg 8192 maxcontig 2 contigsumsize 2
  75. nbfree 8202122 ndir 245 nifree 35420647 nffree 303
  76. bpg 40195 fpg 321560 ipg 161024 unrefs 0
  77. nindir 8192 inopb 256 maxfilesize 36033195603132415
  78. sbsize 8192 cgsize 65536 csaddr 5064 cssize 8192
  79. sblkno 16 cblkno 24 iblkno 32 dblkno 5064
  80. cgrotor 0 fmod 0 ronly 0 clean 0
  81. metaspace 12856 avgfpdir 64 avgfilesize 16384
  82. flags soft-updates
  83. fsmnt /var
  84. volname swuid 0 providersize 70638592
  85.  
  86. =========================================================================
  87. Benchmark #1: bonnie++
  88.  
  89. -------------------------------------------------------------------------
  90. test-32kb-stripe $ bonnie++ -n64 -d /var/tmp -c8
  91.  
  92. Version 1.97 ------Sequential Output------ --Sequential Input- --Random-
  93. Concurrency 8 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
  94. Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
  95. test-32kb-strip 48G 706 99 308393 40 86048 53 1607 99 291870 23 637.2 13
  96. Latency 12500us 73107us 7250ms 14342us 636ms 171ms
  97. Version 1.97 ------Sequential Create------ --------Random Create--------
  98. test-32kb-stripe -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
  99. files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
  100. 64 59258 91 +++++ +++ +++++ +++ 56580 92 +++++ +++ +++++ +++
  101. Latency 38851us 15us 165us 38792us 22us 103us
  102.  
  103.  
  104. -------------------------------------------------------------------------
  105. test-1mb-stripe $ bonnie++ -n64 -d /var/tmp -c8
  106.  
  107. Version 1.97 ------Sequential Output------ --Sequential Input- --Random-
  108. Concurrency 8 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
  109. Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
  110. test-1mb-stripe 48G 711 99 312911 41 130135 43 1611 99 423189 30 671.0 15
  111. Latency 12435us 336ms 6687ms 9230us 258ms 671ms
  112. Version 1.97 ------Sequential Create------ --------Random Create--------
  113. test-1mb-stripe -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
  114. files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
  115. 64 60443 95 +++++ +++ +++++ +++ 60824 94 +++++ +++ +++++ +++
  116. Latency 39072us 17us 77us 38960us 23us 72us
  117.  
  118. =========================================================================
  119. Benchmark #2: pgbench - previously warmed DB
  120.  
  121.  
  122. Methodology:
  123.  
  124. 1. Init the DB (26 GB DB size):
  125.  
  126. pgbench -i -s 2000 pgbench
  127.  
  128. 2. "Warm" the DB cache for 5 hours:
  129.  
  130. pgbench -j 6 -c 6 -T 18000 -S pgbench
  131.  
  132. 3. Make a couple of test attempts (15 min long each) to make sure the results are stable - see below.
  133.  
  134. -------------------------------------------------------------------------
  135. test-32kb-stripe $ pgbench -j 10 -c 10 -r -T 900 pgbench
  136.  
  137. tps = 254.190917 (including connections establishing)
  138. tps = 254.196753 (excluding connections establishing)
  139. statement latencies in milliseconds:
  140. 0.002367 \set nbranches 1 * :scale
  141. 0.000877 \set ntellers 10 * :scale
  142. 0.000817 \set naccounts 100000 * :scale
  143. 0.000844 \setrandom aid 1 :naccounts
  144. 0.000728 \setrandom bid 1 :nbranches
  145. 0.000736 \setrandom tid 1 :ntellers
  146. 0.000699 \setrandom delta -5000 5000
  147. 0.031943 BEGIN;
  148. 13.001537 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
  149. 0.109910 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
  150. 0.179934 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
  151. 0.178669 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
  152. 0.088774 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
  153. 25.732963 END;
  154.  
  155. -------------------------------------------------------------------------
  156. test-1mb-stripe $ pgbench -j 10 -c 10 -r -T 900 pgbench
  157.  
  158. tps = 626.001747 (including connections establishing)
  159. tps = 626.012862 (excluding connections establishing)
  160. statement latencies in milliseconds:
  161. 0.002093 \set nbranches 1 * :scale
  162. 0.000821 \set ntellers 10 * :scale
  163. 0.000770 \set naccounts 100000 * :scale
  164. 0.000760 \setrandom aid 1 :naccounts
  165. 0.000673 \setrandom bid 1 :nbranches
  166. 0.000699 \setrandom tid 1 :ntellers
  167. 0.000667 \setrandom delta -5000 5000
  168. 0.029973 BEGIN;
  169. 5.243319 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
  170. 0.114803 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
  171. 0.132933 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
  172. 0.132787 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
  173. 0.088243 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
  174. 10.219683 END;
  175.  
  176. =========================================================================
  177. Benchmark #3: pgbench - cold DB
  178.  
  179.  
  180. Methodology:
  181.  
  182. 1. Init the DB on a fresh installed OS (26 GB DB size):
  183.  
  184. pgbench -i -s 2000 pgbench
  185.  
  186. 2. Reboot the server.
  187.  
  188. 3. Measure pgbench preformance
  189.  
  190. -------------------------------------------------------------------------
  191. $ pgbench -j 10 -c 10 -r -T 900 pgbench
  192.  
  193. * 32 KB (half of the UFS bsize) - tps=198
  194.  
  195. * 64 KB - tps=226
  196.  
  197. * 128 KB (default for the RAID controller) - tps=298
  198.  
  199. * 1 MB (max for the RAID controller) - tps=347
  200.  
  201. =========================================================================
  202. Benchmark #4: pgbench - cold DB, big DB size
  203.  
  204.  
  205. Methodology:
  206.  
  207. 1. Init the DB on a fresh installed OS (88 GB DB size):
  208.  
  209. pgbench -i -s 6000 pgbench
  210.  
  211. 2. Reboot the server.
  212.  
  213. 3. Measure pgbench preformance
  214.  
  215. -------------------------------------------------------------------------
  216. $ pgbench -j 10 -c 10 -r -T 900 pgbench
  217.  
  218. * 32 KB (half of the UFS bsize) - tps=161
  219.  
  220. * 1 MB (max for the RAID controller) - tps=258
  221.  
  222. =========================================================================
  223. Benchmark #5: randomio on 48 MB file
  224.  
  225.  
  226. Methodology:
  227.  
  228. 1. Create 48 MB file:
  229.  
  230. dd if=/dev/zero of=/var/tmp/test-file bs=1m count=48000
  231.  
  232. 2. Measurement:
  233.  
  234. randomio file 8 0.5 1 8192 10 10
  235.  
  236. 3. Reboot the server:
  237.  
  238. 4. Do the measurement with the same parameters.
  239.  
  240. -------------------------------------------------------------------------
  241.  
  242. * 32 KB (half of the UFS bsize) - before the server reboot
  243.  
  244. total | read: latency (ms) | write: latency (ms)
  245. iops | iops min avg max sdev | iops min avg max sdev
  246. --------+-----------------------------------+----------------------------------
  247. 242.6 | 120.7 0.0 38.4 678.9 91.2 | 121.9 0.2 27.2 650.0 45.4
  248. 223.0 | 110.8 0.0 41.2 778.7 96.4 | 112.2 0.2 30.7 791.9 41.8
  249. 196.1 | 96.7 0.0 46.7 1442.9 141.6 | 99.4 0.2 33.9 825.0 54.4
  250. 201.9 | 99.8 0.0 43.5 871.9 102.1 | 102.1 0.2 37.0 695.2 44.5
  251. 179.9 | 87.7 0.0 53.2 1941.9 187.4 | 92.2 0.2 34.7 1836.3 75.9
  252. 175.1 | 89.1 0.0 56.2 1628.5 183.4 | 86.0 0.2 36.3 870.3 59.1
  253. 190.7 | 99.3 0.0 43.5 1923.5 158.1 | 91.4 0.2 38.5 1175.7 58.8
  254. 184.3 | 94.0 0.0 50.1 1433.9 144.6 | 90.3 0.2 35.9 1271.4 62.4
  255. 183.2 | 91.9 0.0 48.8 1039.8 112.4 | 91.3 0.2 41.1 1118.1 56.5
  256. 176.7 | 86.0 0.0 50.2 1021.0 146.8 | 90.7 0.2 38.5 918.0 58.4
  257.  
  258. * 32 KB (half of the UFS bsize) - after the server reboot
  259.  
  260. total | read: latency (ms) | write: latency (ms)
  261. iops | iops min avg max sdev | iops min avg max sdev
  262. --------+-----------------------------------+----------------------------------
  263. 127.5 | 63.9 3.7 83.0 1551.1 254.8 | 63.6 4.9 40.8 1518.6 110.8
  264. 130.8 | 65.3 3.7 75.1 1707.4 233.9 | 65.5 5.6 34.8 1565.5 96.3
  265. 122.7 | 60.0 4.4 101.0 2151.3 315.4 | 62.7 0.2 37.2 1629.2 113.8
  266. 120.6 | 58.9 0.1 91.1 2352.9 326.4 | 61.7 5.4 45.7 2222.8 125.2
  267. 121.3 | 61.7 0.1 84.7 2294.2 275.8 | 59.6 0.3 43.0 2214.4 112.4
  268. 118.5 | 57.8 0.1 91.5 3463.5 366.8 | 60.7 0.3 47.0 3369.1 150.8
  269. 118.4 | 58.4 0.0 94.6 1864.9 276.8 | 60.0 0.3 46.9 1719.2 108.8
  270. 112.9 | 54.1 0.0 97.3 2104.2 291.1 | 58.8 0.2 45.1 1962.7 119.5
  271. 111.4 | 55.9 0.0 99.0 1437.7 292.0 | 55.5 5.2 45.9 1411.3 119.0
  272. 108.3 | 56.0 0.1 91.6 3224.1 400.1 | 52.3 5.3 43.7 3106.2 173.2
  273.  
  274. * 1 MB (max for the RAID controller) - before the server reboot
  275.  
  276. total | read: latency (ms) | write: latency (ms)
  277. iops | iops min avg max sdev | iops min avg max sdev
  278. --------+-----------------------------------+----------------------------------
  279. 326.2 | 163.5 0.0 25.8 519.6 57.3 | 162.7 0.2 22.8 519.4 35.2
  280. 341.0 | 168.2 0.0 22.1 271.4 40.6 | 172.8 0.2 24.1 199.6 28.3
  281. 329.1 | 160.4 0.0 26.2 405.1 54.5 | 168.7 0.2 23.6 269.5 30.7
  282. 332.6 | 170.2 0.0 25.2 393.2 52.7 | 162.4 0.2 22.6 292.1 28.3
  283. 339.2 | 173.3 0.0 22.9 454.2 47.5 | 165.9 0.2 24.4 287.0 30.7
  284. 329.4 | 162.0 0.0 26.8 493.2 54.1 | 167.4 0.2 21.9 295.6 28.5
  285. 327.8 | 164.3 0.0 23.7 404.7 47.0 | 163.5 0.2 25.2 288.4 28.6
  286. 337.0 | 166.3 0.0 24.3 348.7 42.9 | 170.7 0.2 23.0 246.1 28.1
  287. 341.7 | 170.5 0.0 24.6 428.4 55.8 | 171.2 0.2 22.3 339.5 28.8
  288. 327.6 | 162.1 0.0 24.3 353.6 48.5 | 165.5 0.2 24.2 231.9 27.3
  289.  
  290. * 1 MB (max for the RAID controller) - after the server reboot
  291.  
  292. total | read: latency (ms) | write: latency (ms)
  293. iops | iops min avg max sdev | iops min avg max sdev
  294. --------+-----------------------------------+----------------------------------
  295. 198.9 | 98.2 1.4 53.3 1276.1 155.5 | 100.7 1.7 27.4 867.9 59.1
  296. 202.0 | 100.5 1.3 48.6 916.8 136.4 | 101.5 0.2 29.3 884.1 60.3
  297. 198.6 | 99.4 0.1 51.6 1170.8 167.8 | 99.2 1.5 28.4 1136.7 70.2
  298. 197.6 | 96.8 1.4 57.7 2077.8 221.2 | 100.8 1.6 25.8 2085.9 91.2
  299. 201.6 | 97.8 0.0 50.0 1084.7 139.2 | 103.8 1.5 28.1 1084.3 59.6
  300. 192.3 | 98.6 0.0 57.8 2635.7 276.9 | 93.7 1.3 22.4 2503.0 113.8
  301. 200.6 | 103.1 0.0 55.6 1643.6 180.6 | 97.5 1.7 26.6 1439.5 73.8
  302. 196.0 | 100.7 0.0 51.9 2171.5 244.0 | 95.3 0.2 22.7 1585.5 88.2
  303. 190.1 | 94.9 0.0 68.2 3859.9 377.4 | 95.2 0.2 22.5 2631.3 133.2
  304. 198.1 | 95.4 0.0 52.8 1339.4 167.3 | 102.7 0.2 23.8 1302.2 72.7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement