{"id":759,"date":"2009-09-13T22:22:05","date_gmt":"2009-09-14T02:22:05","guid":{"rendered":"http:\/\/cd34.com\/blog\/?p=759"},"modified":"2009-09-13T22:22:05","modified_gmt":"2009-09-14T02:22:05","slug":"piix-versus-ahci","status":"publish","type":"post","link":"https:\/\/cd34.com\/blog\/infrastructure\/piix-versus-ahci\/","title":{"rendered":"piix versus ahci"},"content":{"rendered":"<p>While working with some new motherboards, I decided to do some testing.  Since most motherboards ship with AHCI disabled and we needed hotplug for a new project, I wanted to do some testing to see if there was going to be a performance hit by using the AHCI drivers rather than the piix driver.<\/p>\n<p>To make sure we have a very stable benchmark, the same machine, without any changes other than switching AHCI on through the BIOS was tested twice.  Granted, this is an older motherboard in a machine used for testing and development, the results on other motherboards should be similar.<\/p>\n<p>The difference in the input\/output and seeks are negligible.  The sequential create and delete results generally show much improved results for create\/delete but the read results are virtually unchanged.  This is probably a result of the Native Command Queuing (NCQ) enabled in AHCI that isn&#8217;t present in the piix driver.  Since the firmware on the disk can reorder requests based on the rotational position of the data it needs to access, there are some benefits.<\/p>\n<p>Since it doesn&#8217;t appear to be detrimental to enable AHCI, and it does increase performance of two particular portions of the benchmark that may not really be exercised in a normal webserver environment, if you have the ability to run your hardware in AHCI mode rather than the native piix mode, I would suggest using AHCI.<\/p>\n<p>The command line used:  \/usr\/sbin\/bonnie -n 384<\/p>\n<h3>piix results:<\/h3>\n<pre>\r\nVersion  1.96       ------Sequential Output------ --Sequential Input- --Random-\r\nConcurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--\r\nMachine        Size K\/sec %CP K\/sec %CP K\/sec %CP K\/sec %CP K\/sec %CP  \/sec %CP\r\nkvm              4G   439  99 52686  15 27168   5  2039  99 62782   4 228.9   3\r\nLatency             48125us    1645ms    1545ms   16144us     137ms     863ms\r\nVersion  1.96       ------Sequential Create------ --------Random Create--------\r\nkvm                 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--\r\n              files  \/sec %CP  \/sec %CP  \/sec %CP  \/sec %CP  \/sec %CP  \/sec %CP\r\n                384 17299  43 379058  99   777   1 24781  49 522877 100   579   1\r\nLatency              1773ms     169us   18519ms    1403ms      14us   14935ms\r\n1.96,1.96,kvm,1,1252886317,4G,,439,99,52686,15,27168,5,2039,99,62782,4,228.9,3,384,,,,,17299,43,379058,99,777,1,24781,49,522877,100,579,1,48125us,1645ms,1545ms,16144us,137ms,863ms,1773ms,169us,18519ms,1403ms,14us,14935ms\r\n<\/pre>\n<h3>AHCI results:<\/h3>\n<pre>\r\nVersion  1.96       ------Sequential Output------ --Sequential Input- --Random-\r\nConcurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--\r\nMachine        Size K\/sec %CP K\/sec %CP K\/sec %CP K\/sec %CP K\/sec %CP  \/sec %CP\r\nkvm              4G   430  98 52639  14 27533   5  2066  99 62991   4 224.5   1\r\nLatency             50870us    1532ms    1655ms   10203us   21423us     953ms\r\nVersion  1.96       ------Sequential Create------ --------Random Create--------\r\nkvm                 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--\r\n              files  \/sec %CP  \/sec %CP  \/sec %CP  \/sec %CP  \/sec %CP  \/sec %CP\r\n                384 28173  56 373407  98  1645   2 31110  61 522376  99  1026   1\r\nLatency              1363ms     157us   12877ms    1216ms      61us   11397ms\r\n1.96,1.96,kvm,1,1252887577,4G,,430,98,52639,14,27533,5,2066,99,62991,4,224.5,1,384,,,,,28173,56,373407,98,1645,2,31110,61,522376,99,1026,1,50870us,1532ms,1655ms,10203us,21423us,953ms,1363ms,157us,12877ms,1216ms,61us,11397ms\r\n<\/pre>\n<p>Output from <strong>lspci -vvnn<\/strong> with the piix driver selected:<\/p>\n<pre>\r\n00:1f.2 IDE interface [0101]: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller [8086:2820] (rev 02) (prog-if 8a [Master SecP PriP])\r\n\tSubsystem: Super Micro Computer Inc Device [15d9:8780]\r\n\tControl: I\/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\r\n\tStatus: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <tabort - <MAbort- >SERR- <perr - INTx-\r\n\tLatency: 0\r\n\tInterrupt: pin B routed to IRQ 17\r\n\tRegion 0: I\/O ports at 01f0 [size=8]\r\n\tRegion 1: I\/O ports at 03f4 [size=1]\r\n\tRegion 2: I\/O ports at 0170 [size=8]\r\n\tRegion 3: I\/O ports at 0374 [size=1]\r\n\tRegion 4: I\/O ports at 30d0 [size=16]\r\n\tRegion 5: I\/O ports at 30c0 [size=16]\r\n\tCapabilities: [70] Power Management version 3\r\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)\r\n\t\tStatus: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-\r\n\tKernel driver in use: ata_piix\r\n<\/pre>\n<p>Output from <strong>lspci -vvnn<\/strong> with the ahci driver selected:<\/p>\n<pre>\r\n00:1f.2 SATA controller [0106]: Intel Corporation 82801HB (ICH8) 4 port SATA AHCI Controller [8086:2824] (rev 02) (prog-if 01 [AHCI 1.0])\r\n\tSubsystem: Super Micro Computer Inc Device [15d9:8780]\r\n\tControl: I\/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+\r\n\tStatus: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <tabort - <MAbort- >SERR- <perr - INTx-\r\n\tLatency: 0\r\n\tInterrupt: pin B routed to IRQ 28\r\n\tRegion 0: I\/O ports at 3410 [size=8]\r\n\tRegion 1: I\/O ports at 3404 [size=4]\r\n\tRegion 2: I\/O ports at 3408 [size=8]\r\n\tRegion 3: I\/O ports at 3400 [size=4]\r\n\tRegion 4: I\/O ports at 30a0 [size=32]\r\n\tRegion 5: Memory at d0404000 (32-bit, non-prefetchable) [size=2K]\r\n\tCapabilities: [80] MSI: Enable+ Count=1\/16 Maskable- 64bit-\r\n\t\tAddress: fee0300c  Data: 4181\r\n\tCapabilities: [70] Power Management version 3\r\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)\r\n\t\tStatus: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-\r\n\tCapabilities: [a8] SATA HBA <?>\r\n\tKernel driver in use: ahci\r\n<\/perr><\/tabort><\/pre>\n<h3>Technical Specs:<\/h3>\n<p>Debian\/Squeeze\/Sid (Testing)<br \/>\nSupermicro P4SBE Motherboard<br \/>\nIntel(R) Core(TM)2 CPU          6300  @ 1.86GHz<\/perr><\/tabort><\/p>\n<div style=\"float:left;\">\n<div id=\"fb-root\"><\/div>\n<fb:like href=\"https:\/\/cd34.com\/blog\/infrastructure\/piix-versus-ahci\/\" width=\"250\" send=\"false\" show_faces=\"false\" layout=\"button_count\" action=\"recommend\"><\/fb:like>\n<\/div><div style=\"clear:both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>While working with some new motherboards, I decided to do some testing. Since most motherboards ship with AHCI disabled and we needed hotplug for a new project, I wanted to do some testing to see if there was going to be a performance hit by using the AHCI drivers rather than the piix driver. To [&hellip;]<\/p>\n<div style=\"float:left;\">\n<div id=\"fb-root\"><\/div>\n<fb:like href=\"https:\/\/cd34.com\/blog\/infrastructure\/piix-versus-ahci\/\" width=\"250\" send=\"false\" show_faces=\"false\" layout=\"button_count\" action=\"recommend\"><\/fb:like>\n<\/div><div style=\"clear:both;\"><\/div>","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[75,74,76],"class_list":["post-759","post","type-post","status-publish","format-standard","hentry","category-infrastructure","tag-ahci","tag-piix","tag-sata"],"_links":{"self":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts\/759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/comments?post=759"}],"version-history":[{"count":11,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts\/759\/revisions"}],"predecessor-version":[{"id":770,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts\/759\/revisions\/770"}],"wp:attachment":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/media?parent=759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/categories?post=759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/tags?post=759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}