Re: Performance hit of frequent smartctl -A listings
"Ivan Lezhnjov Jr." <[email protected]>
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <[email protected]> |
I've ran this command % time smartctl -r ioctl -A /dev/sda |egrep "durat|real" info=0x0 duration=0 milliseconds resid=0 info=0x0 duration=10 milliseconds resid=0 info=0x0 duration=13 milliseconds resid=0 info=0x0 duration=150 milliseconds resid=0 info=0x0 duration=23 milliseconds resid=0 real 0m0.236s user 0m0.033s sys 0m0.007s and there's apparently an extra overhead besides the ioctl commands, which is expected but it's pretty cool to see a breakdown like this :) This turns out to be a poor result on my system, though, as these numbers are two times less what they were initially on the first run: real 0m0.421s user 0m0.040s sys 0m0.010s Also, this data is for the older drive FUJITSU MHW2080BH. My brand new WDC WD20NMVW-11AV3S0 external USB drives scored real 0m0.067s user 0m0.050s sys 0m0.003s and real 0m0.040s user 0m0.033s sys 0m0.003s which is so much faster. Ivan On Dec 8, 2013, at 3:00 AM, John Gilmore <[email protected]> wrote: >>> I was wondering if it is a good idea to have monitoring system call smartctl -A /dev/sdX somewhat frequently on my drives to monitor drives temperatures. I'm thinking 2-5 minutes interval, but I'm wondering how much of a performance hit on a drive is smartctl -A. > > It probably varies on each drive; measure it and decide for yourself if > it's impacting your performance. > >>> In fact, I would love to monitor most of the values in in smartctl -A output, which could lead to about 17 calls each 5 minutes. I know this is a very dumb way to go about it, and some intermediary caching mechanism is perhaps a must, but still, how costly are these listings? > > Don't "cache" it. Call smartctl -A once and parse the listing once, > to extract whatever 17 values you need. > > John > > ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk