{"id":385,"date":"2009-03-22T10:47:05","date_gmt":"2009-03-22T07:47:05","guid":{"rendered":"http:\/\/www.void.gr\/kargig\/blog\/?p=385"},"modified":"2009-05-02T17:03:05","modified_gmt":"2009-05-02T14:03:05","slug":"severely-degraded-harddisk-performance-on-sata_sil-by-athcool","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2009\/03\/22\/severely-degraded-harddisk-performance-on-sata_sil-by-athcool\/","title":{"rendered":"Severely degraded harddisk performance on sata_sil by athcool"},"content":{"rendered":"<p>I am writing this post to provide some statistics on athcool + sata_sil usage. The results are horrible.<\/p>\n<p><a href=\"http:\/\/members.jcom.home.ne.jp\/jacobi\/linux\/softwares.html#athcool\">Athcool<\/a> is a small utility, enabling\/disabling Powersaving mode for AMD Athlon\/Duron processors.<br \/>\nThe homepage of the utility has a big fat warning as well:<\/p>\n<blockquote><p><strong>WARNING<\/strong>: Depending on your motherboard and\/or hardware components, enabling powersaving mode may cause:<\/p>\n<p>    * noisy or distorted sound playback<br \/>\n    * a slowdown in harddisk performance<br \/>\n    * system locks or instability\n<\/p><\/blockquote>\n<p>The Gentoo ebuild also has these warnings:<\/p>\n<blockquote><p>\tewarn &#8220;WARNING: Depending on your motherboard and\/or hardware components,&#8221;<br \/>\n\tewarn &#8220;enabling powersaving mode may cause:&#8221;<br \/>\n\tewarn &#8221; * noisy or distorted sound playback&#8221;<br \/>\n\tewarn &#8221; * a slowdown in harddisk performance&#8221;<br \/>\n\tewarn &#8221; * system locks or unpredictable behavior&#8221;<br \/>\n\tewarn &#8221; * file system corruption&#8221;<br \/>\n\tewarn &#8220;If you met those problems, you should not use athcool.  Please use&#8221;<br \/>\n\tewarn &#8220;athcool AT YOUR OWN RISK!&#8221;\n<\/p><\/blockquote>\n<p>Ignoring all these warning I was using athcool for years on my old desktop box filled with 2 IDE disks. Never had any real problem at all, except for a some performance loss. The problem appeared when I first used a sata disk on motherboard&#8217;s, Gigabyte GA-7VAXP-A Ulta, sata controller which uses the sata_sil module.<br \/>\n<!--more--><br \/>\nHere are some tests using dd and vmstat. The two commands were run on different terminals at the same time:<br \/>\n<strong>1) athcool off<\/strong><br \/>\n<em>a) dd to <strong>IDE<\/strong><\/em><br \/>\n<code>(TERMINAL 1) user@box:~% vmstat 1<br \/>\nprocs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----<br \/>\n 0  0      0 392296  19272 663892    0    0     0    56  260  332  0  0 100  0<br \/>\n 1  0      0 813648  19344 245960    0    0     4 64604  486  849  4 58 14 24<br \/>\n 0  1      0 769380  19388 289680    0    0     0 44032  399  890  3 30  0 67<br \/>\n 0  2      0 769876  19388 290704    0    0     0     4  368  594  1  3  0 96<br \/>\n 0  3      0 708372  19460 351120    0    0     0 40632  347  589  2 46  0 52<br \/>\n 0  1      0 674272  19492 383928    0    0     0 53936  471  821  1 27  0 72<br \/>\n 0  1      0 655796  19508 401744    0    0     0 17640  376  651  1 13  0 86<br \/>\n 0  1      0 588712  19572 466880    0    0     0 65544  469 1024  9 40  0 51<br \/>\n 1  1      0 579412  19584 478072    0    0     0  6148  368  852  5  8  0 87<br \/>\n 0  2      0 504516  19664 550856    0    0     0 79104  414  817  3 52  0 45<br \/>\n 1  0      0 453800  19712 600040    0    0     0 45420  350  616  4 30  0 66<br \/>\n 0  1      0 414740  19748 637952    0    0     0 40872  401  700  3 26  0 71<br \/>\n 0  1      0 367248  19792 684064    0    0     0 46112  357  619  5 32  0 63<br \/>\n 1  1      0 360552  19804 693280    0    0     0  7240  421  795  2  8  0 90<br \/>\n 2  1      0 268668  19896 782368    0    0     0 84768  385  722  5 65  0 30<br \/>\n 2  1      0 230724  19932 819248    0    0     0 43672  378  598  2 27  0 71<br \/>\n 1  1      0 184224  19976 864328    0    0     0 45080  349  587  5 27  0 68<br \/>\n 0  1      0 142932  20016 904288    0    0     0 39960  369  653  1 33  0 66<br \/>\n 1  1      0 136608  20032 913928    0    0     0  6400  337  523  2 11  0 87<br \/>\n 0  1      0  46708  20120 1000568    0    0     0 90360  387  626  4 61  0 35<br \/>\n 0  1      0  26508  14348 1025136    0    0     0 44048  346  633  1 29  0 70<br \/>\n 0  1      0  23404  13368 1028324    0    0     0 42016  363  638  2 26  0 72<br \/>\n 0  1      4  23776  11816 1028108    0    0     0 43048  336  631  0 30  0 70<br \/>\n 1  1      4  24024  11000 1031428    0    0     0 26796  391  663  4 25  0 71<br \/>\n 0  0      4  23652  11028 1032324    0    0     0 16836  336  648  2 14 18 66<br \/>\n 0  0      4  23776  11028 1032324    0    0     0     0  278  397  1  0 99  0<br \/>\n(TERMINAL 2) user@box:~%dd if=\/dev\/zero of=\/path\/to\/parition\/on\/IDE\/disk\/file bs=1024 count=1000000<br \/>\n1000000+0 records in<br \/>\n1000000+0 records out<br \/>\n1024000000 bytes (1.0 GB) copied, 22.8884 s, 44.7 MB\/s<br \/>\n<\/code><br \/>\nPretty decent performace.<\/p>\n<p><em>b) dd to <strong>SATA<\/strong><\/em><br \/>\n<code>(TERMINAL 1) user@box:~% vmstat 1<br \/>\nprocs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----<br \/>\n 0  0      4 738008  21872 317948    0    0     0     0  308  427  2  0 98  0<br \/>\n 0  0      4 738008  21880 317948    0    0     0    48  268  342  0  1 99  0<br \/>\n 3  0      4 722508  21916 334312    0    0     4  8456  320  491  3 11 84  2<br \/>\n 1  0      4 647612  22008 407372    0    0     0 80844  374  762  9 52  0 39<br \/>\n 0  1      4 624796  22032 429996    0    0     0 22528  389  465  0 17  0 83<br \/>\n 1  0      4 557836  22096 495032    0    0     0 64520  361  395  3 50  0 47<br \/>\n 1  0      4 512576  22136 539012    0    0     0 44032  386  548  5 33  0 62<br \/>\n 0  2      4 473640  22176 579080    0    0     0 38916  353  488  2 31  0 67<br \/>\n 2  0      4 448220  22220 605548    0    0     0 23156  399  434  3 20  0 77<br \/>\n 0  1      4 381880  22280 669192    0    0     0 60492  353  374  2 48  0 50<br \/>\n 1  0      4 331784  22328 717848    0    0     0 49272  388  431  3 36  0 61<br \/>\n 1  2      4 286648  22372 761716    0    0     0 43120  345  366  4 33  0 63<br \/>\n 0  3      4 249696  22408 799240    0    0     0 46832  391  437  2 30  0 68<br \/>\n 1  3      4 212124  22448 837352    0    0     0 28460  351  446  3 29  0 68<br \/>\n 0  2      4 161160  22496 886304    0    0     0 58856  439  479  3 39  0 58<br \/>\n 0  2      4 115652  22540 930336    0    0     0 44032  355  523  2 32  0 66<br \/>\n 0  2      4  68036  22584 976416    0    0     0 46080  426  699  6 32  0 62<br \/>\n 1  1      4  22548  22628 1020476    0    0     0 44028  366  590 15 29  0 56<br \/>\n 2  2      4  23032  22672 1019420    0    0     0 42012  386 1082 40 36  0 24<br \/>\n 0  2      4  24272  20772 1019388    0    0     0 45116  360  779 16 36  0 48<br \/>\n 1  1    184  23652  16948 1022416    0    0     0 33968  365  446 20 30  0 50<br \/>\n 0  2    184  23280  16668 1022620    0    0     0 50188  369  505  3 35  0 62<br \/>\n 0  2    184  24520  16688 1020540    0    4     0 44036  376  458  9 36  0 55<br \/>\n 0  2    184  27868  16632 1022072    0    0     0 25908  459  441  5 19  0 76<br \/>\n 1  1    184  23652   6796 1036996    0    0     0 37820  386  472  3 30  0 67<br \/>\n 0  0    184  24520   6084 1037356    0    0     0 16580  342  424  4 15  1 80<br \/>\n 0  0    184  24644   6084 1037356    0    0     0     0  294  374  1  0 99  0<br \/>\n(TERMINAL 2) user@box:~%dd if=\/dev\/zero of=\/path\/to\/parition\/on\/SATA\/disk\/file bs=1024 count=1000000<br \/>\n1000000+0 records in<br \/>\n1000000+0 records out<br \/>\n1024000000 bytes (1.0 GB) copied, 22.2838 s, 46.0 MB\/s<br \/>\n<\/code><br \/>\nSata was a bit faster, as expected.<\/p>\n<p><strong>2) athcool on<\/strong><br \/>\n<em>a) dd to <strong>IDE<\/strong><\/em><br \/>\n<code>(TERMINAL 1) user@box:~% vmstat 1<br \/>\nprocs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----<br \/>\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa<br \/>\n 2  0    184 119536   7040 942204    0    0   119  2047  300  740  8  3 82  7<br \/>\n 0  0    184 119536   7040 942204    0    0     0     0  290  711  4  0 96  0<br \/>\n 1  2    184 103292   7092 958828    0    0    16  4496  413  685  2 13 82  3<br \/>\n 0  1    184  67828   7124 993432    0    0     0 46884  612 1149  2 30  0 68<br \/>\n 0  1    184  54188   7136 1006756    0    0     0 13312  552  878  2 12  0 86<br \/>\n 0  1    184  22908   7196 1036576    0    0     0 62472  447 1007  7 50  0 43<br \/>\n 0  1    184  24644   7224 1034272    0    0     0 24428  459  739  1 27  0 72<br \/>\n 0  3    184  25760   7236 1034740    0    0     0  4392  499  732  2 10  0 88<br \/>\n 1  3    184  23652   7284 1036484    0    0     0 42900  536  977  3 39  0 58<br \/>\n 1  4    184  25140   7308 1034448    0    0     0 41144  470  861  3 19  0 78<br \/>\n 0  2    184  24636   7340 1034084    0    0    12 33816  466  797  4 26  0 70<br \/>\n 0  2    184  25256   7340 1034084    0    0     0     0  447  605  2  3  0 95<br \/>\n 0  2    184  22904   7424 1035360    0    0     4 73032  466  848  6 58  0 36<br \/>\n 0  2    184  23272   7452 1036132    0    0     0 23308  458  786  3 27  0 70<br \/>\n 0  2    184  24144   7500 1035644    0    0     0 46364  478  800  7 35  0 58<br \/>\n 0  2    184  25132   7560 1034492    0    0     0 23356  441  673  2 16  0 82<br \/>\n 0  2    184  25752   7560 1034492    0    0     0     0  502  728  1  0  0 99<br \/>\n 0  1    184  23768   7632 1034748    0    0     0 74820  407  778  6 57  0 37<br \/>\n 0  2    184  23644   7672 1035388    0    0     0 41016  465  829  5 30  0 65<br \/>\n 0  2    184  23272   7712 1036284    0    0     0 39216  448  744  3 31  0 66<br \/>\n 0  1    184  23148   7752 1035900    0    0     0 37084  535 1120  3 29  0 68<br \/>\n 0  1    184  23024   7800 1035420    0    0     0 46112  435  724  3 34  0 63<br \/>\n 0  1    184  23024   6900 1035472    0    0     0 34832  480  737  5 24  0 71<br \/>\n 1  1    184  23024   6660 1036344    0    0     0 28956  450  759  2 30  0 68<br \/>\n 1  1    184  24016   6592 1035540    0    0     0 37108  483  873  2 27  0 71<br \/>\n 0  1    184  23396   6636 1036104    0  180     0 46644  420  874  6 34  0 60<br \/>\n 1  0    196  23148   6668 1036156    0    0     0 37896  473  812  5 29  0 66<br \/>\n 0  1    196  23272   6712 1035412    0    0     0 45064  409  709  2 34  0 64<br \/>\n 1  1    196  23148   6720 1037232    0    0     0   356  471  637  2  7  0 91<br \/>\n 0  2    196  23648   6744 1036236    0    0     0 48400  433  893  3 34  0 63<br \/>\n 0  1    196  23396   6276 1036672    0    0     0 46100  462 1001  4 33  0 63<br \/>\n 0  0    196  24016   6280 1036672    0    0     0     4  445  586  1  2 75 22<br \/>\n 0  0    196  24388   6280 1036672    0    0     0     0  358  475  1  3 96  0<br \/>\n 0  0    196  24388   6280 1036672    0    0     0     0  272  362  1  0 99  0<br \/>\n(TERMINAL 2) user@box:~% dd if=\/dev\/zero of=\/path\/to\/parition\/on\/IDE\/disk\/file bs=1024 count=1000000<br \/>\n1000000+0 records in<br \/>\n1000000+0 records out<br \/>\n1024000000 bytes (1.0 GB) copied, 28.1283 s, 36.4 MB\/s<br \/>\n<\/code><br \/>\nHello degraded performace! 44.7Mb\/s -> 36.4MB\/s. This is a 18.57% drop. Still I consider it quite acceptable for a desktop pc.<\/p>\n<p><em>a) dd to <strong>SATA<\/strong><\/em><br \/>\n<code>(TERMINAL 1) user@box:~% vmstat 1<br \/>\nprocs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----<br \/>\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa<br \/>\n 2  0    196 1031508   5284  43612    0    0    94  2389  310  715  8  3 77 12<br \/>\n 0  0    196 1031508   5284  43612    0    0     0     0  312  662  5  0 95  0<br \/>\n 1  0    196 966284   5284 107512    0    0     0 63484  343  457  6 48 15 31<br \/>\n 0  1    196 959588   5284 114240    0    0     0  7168  403  694  4  6  0 90<br \/>\n 0  1    196 952272   5284 121408    0    0     0  7168  371  610  4  8  0 88<br \/>\n 0  1    196 944956   5284 128572    0    0     0  7164  420  478  2  6  0 92<br \/>\n 1  1    196 918544   5324 151464    0    0   376 22652  429 1713 18 27  0 55<br \/>\n 0  2    196 917924   5324 152488    0    0     0  1048  416  649  2  3  0 95<br \/>\n 0  2    196 918048   5324 152488    0    0     0    16  392  540  0  0  0 100<br \/>\n 0  2    196 917552   5336 152648    0    0   172    20  435  780  2  0  0 98<br \/>\n 0  2    196 917676   5336 152648    0    0     0     0  372  491  0  0  0 100<br \/>\n 0  2    196 917800   5344 152648    0    0     0    60  404  559  3  0  0 97<br \/>\n 0  2    196 917924   5344 152648    0    0     0    20  380  620  2  1  0 97<br \/>\n 0  2    196 918172   5344 152648    0    0     0    28  416  966  6  1  0 93<br \/>\n 0  2    196 918296   5344 152648    0    0     0    16  369  356  2  0  0 98<br \/>\n 0  2    196 918420   5344 152648    0    0     0    16  401  384  0  1  0 99<br \/>\n 0  1    196 850840   5360 219204    0    0     0 66884  467  696  3 51  0 46<br \/>\n 0  1    196 845384   5368 224324    0    0     0  5136  419  520  3  1  0 96<br \/>\n 0  1    196 836952   5368 232512    0    0     0  8188  385  742  4  5  0 91<br \/>\n 0  1    196 831744   5368 237632    0    0     0  5120  426  489  0  1  0 99<br \/>\n 0  1    196 825420   5368 243776    0    0     0  6144  422  600  0  1  0 99<br \/>\nprocs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----<br \/>\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa<br \/>\n 1  2    196 819064   5368 245824    0    0     0  2096  417 1427 29  6  0 65<br \/>\n 0  2    196 823560   5368 245824    0    0     0    20  494 1913 16  4  0 80<br \/>\n 0  2    196 823808   5376 245824    0    0     0    28  480 1719  8  2  0 90<br \/>\n 0  1    196 758336   5384 310328    0    0     0 64800  423 1204 24 53  0 23<br \/>\n[snip]<br \/>\n 0  2    196 104236   5628 954752    0    0     0     8  405  745  2  2  0 96<br \/>\n 0  2    196  43600   5640 1013984    0    0     0 59740  453  815  4 44  0 52<br \/>\n 0  2    196  29712   5640 1027300    0    0     0 13320  403  758  3  5  0 92<br \/>\n 0  2    196  23892   5640 1032852    0    0     0  9220  430  693  4  4  0 92<br \/>\n 0  1    196  22776   3892 1035820    0    0     0  7184  402  728  5  1  0 94<br \/>\n 0  1    196  22776   3892 1035820    0    0     0     0  451 1172  5  3  0 92<br \/>\n 0  1    196  22776   3892 1035820    0    0     0     0  386  813  2  1  0 97<br \/>\n 0  1    196  22776   3896 1035820    0    0     0     4  412  385  0  0  0 100<br \/>\n 0  1    196  22776   3896 1035820    0    0     0     4  358  320  0  0  0 100<br \/>\n 0  1    196  25380   3896 1032748    0    0     0     0  416  722  7  1  0 92<br \/>\n 0  1    196  25504   3904 1032748    0    0     0    16  365  404  2  2  0 96<br \/>\n 0  1    196  25628   3904 1032748    0    0     0     0  396  471  1  1  0 98<br \/>\n 0  1    196  25876   3904 1032748    0    0     0     0  364  526  6  0  0 94<br \/>\n 0  0    196  26992   3912 1032748    0    0     0   968  395 1288 14  3 55 28<br \/>\nprocs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----<br \/>\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa<br \/>\n 0  1    196  26992   3912 1032748    0    0     0     4  323 1412 13  1 86  0<br \/>\n 0  0    196  26992   3920 1032748    0    0     0    12  379 1755 16  1 83  0<br \/>\n(TERMINAL 2) user@box:~%dd if=\/dev\/zero of=\/path\/to\/parition\/on\/SATA\/disk\/file bs=1024 count=1000000<br \/>\n1000000+0 records in<br \/>\n1000000+0 records out<br \/>\n1024000000 bytes (1.0 GB) copied, 114.792 s, 8.9 MB\/s<br \/>\n<\/code><br \/>\nWhat about that!!! <strong>46Mb\/s -> 8.9Mb\/s<\/strong> That&#8217;s an incredible 80% percent performance loss! I\/O wait is always maxed at 90-100% which makes the machine totally unresponsive. I had to snip the output of vmstat because it is huge. It&#8217;s more than 140lines while all the others were at max 36 (athcool on, IDE). If anyone wants it I can surely upload it here.<\/p>\n<p>I don&#8217;t think that&#8217;s what the programmer of athcool had in mind when he was talking about degraded performance&#8230;I think this is a bug. I can accept a 20% loss but not an 80% loss of performance. By the way, these tests were performed on ext3, but the same results appear with reiserfs as well.<\/p>\n<p>This &#8220;bug&#8221; took me a while to figure out. I had my sata disk crawling for a long time before I thought of disabling athcool (yeah yeah I know it should have been the first thing to do&#8230;). I initially thought on posting the &#8220;bug&#8221; to the Gentoo bugzilla but while searching it I came up with this: <a href=\"http:\/\/bugs.gentoo.org\/show_bug.cgi?id=248820\"><br \/>\nsys-power\/athcool causes massive filesystem corruption; upstream was informed but did not respond<\/a>. As far as I can tell Gentoo developers think that since there is a warning there is no extra reason that this package should be masked or whatever.<\/p>\n<p>Dear Internets,<br \/>\nIs there anyone else who can confirm the same behavior of athcool with sata controllers ? I don&#8217;t have another sata controller to test, but if someone uses a different sata module, a test like the one I performed would show us whether it&#8217;s a sata_sil problem, so that I should report it to the kernel maintainers or an athcool problem, so that we should at least fill a new bug at the <a href=\"http:\/\/bugs.gentoo.org\">Gentoo bugzilla<\/a> to ask the developers to hardmask the package.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am writing this post to provide some statistics on athcool + sata_sil usage. The results are horrible. Athcool is a small utility, enabling\/disabling Powersaving mode for AMD Athlon\/Duron processors. The homepage of the utility has a big fat warning as well: WARNING: Depending on your motherboard and\/or hardware components, enabling powersaving mode may cause: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[12,3],"tags":[34,37,38,36,41,39,601,43,595,42,35,44,45,40],"class_list":["post-385","post","type-post","status-publish","format-standard","hentry","category-gentoo","category-linux","tag-athcool","tag-bug","tag-bug-report","tag-bugzilla","tag-dd","tag-ext3","tag-gentoo","tag-ide","tag-linux","tag-performance","tag-powesaving","tag-sata","tag-sata_sil","tag-vmstat"],"aioseo_notices":[],"views":9744,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=385"}],"version-history":[{"count":15,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":485,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/385\/revisions\/485"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}