<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:garamond, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Examine the drives with smartctl:<br><br># smartctl -a /dev/hda<br><br>or, if you're using SATA drives<br><br># smartctl -d ata -a /dev/sda <br><br>If you're getting warning messages, take out that drive.<br><br><span><a target="_blank" href="http://smartmontools.sourceforge.net/">http://smartmontools.sourceforge.net/</a></span><br><br>John<br><br>----- Original Message ----<br>From: Daniel Walton &lt;dwalton@cisco.com&gt;<br>To: Discussion about mythtv &lt;mythtv-users@mythtv.org&gt;<br>Sent: Tuesday, March 21, 2006 2:07:22 PM<br>Subject: Re: [mythtv-users] 'wa' field in 'top' is +90% when recording a show<br><br><div>On Mon, 20 Mar 2006, Brian Wood wrote:<br><br>&gt;<br>&gt; On Mar 20, 2006, at 11:25 AM, Daniel Walton
 wrote:<br>&gt;<br>&gt; &gt; I've noticed that sometimes when I'm recording tv and when watching certain<br>&gt; &gt; shows I've recorded, the cpu is pegged at 99% or 100% with most of the<br>&gt; &gt; utilization in 'wa' (wa stands for "I/O wait state").&nbsp;&nbsp;I record a lot of HD<br>&gt; &gt; content so I have two 250 gig drives and I use LVM to make the two drives<br>&gt; &gt; appear as one to mythtv.&nbsp;&nbsp;One of these two drives is a refurb (didn't<br>&gt; &gt; realize it until after I bought it) and I suspect that I'm only seeing the<br>&gt; &gt; high wa utilization when I'm accessing the refurb drive.<br>&gt; &gt;<br>&gt; &gt; How can I verify which drive a show is stored on in a LVM enviroment?&nbsp;&nbsp;Any<br>&gt; &gt; other ideas on what could be causing wa to go sky high?&nbsp;&nbsp;Trying to playback<br>&gt; &gt; a show with the CPU hammered like this doesn't work very well.<br>&gt; &gt;<br>&gt;<br>&gt; I don't know what makes you so quick to blame
 the refurb drive, I<br>&gt; don't think there's any particular reason it should be any more prone<br>&gt; to trouble than a new one. The only drive I have ever had die on me<br>&gt; was new, and I use a lot of refurbed drives.<br><br>I didn't have this problem before I added the refurb drive.&nbsp;&nbsp;Odds are its either<br>the drive or the fact that I'm using LVM.&nbsp;&nbsp;I just need a way to verify which is<br>the issue.<br><br>&gt;<br>&gt; I've read that LVM has a lot of overhead, more than it has any right<br>&gt; to have. I have a pair of 250GB drives running as a software RAID0<br>&gt; array and they work just fine, I had a lot of problems when I tried<br>&gt; LVM, although I am using the system for just SD.<br><br>If the LVM overhead is what is causing my high wa cpu usage then I don't see how<br>LVM ever gained any popularity.&nbsp;&nbsp;Here is a good example of the problem, this is<br>happening when I run mythtranscode on a SD show:<br><br>backend:~# dstat
 -a<br>----total-cpu-usage---- -disk/total -net/total- ---paging-- ---system-- ---load-avg---<br>usr sys idl wai hiq siq|_read write|_recv _send|__in_ _out_|_int_ _csw_|_1m_ _5m_ 15m_<br> 14&nbsp;&nbsp; 2&nbsp;&nbsp;72&nbsp;&nbsp;12&nbsp;&nbsp; 0&nbsp;&nbsp; 0|&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 |2.41 2.36 1.42<br>&nbsp;&nbsp;3&nbsp;&nbsp; 1&nbsp;&nbsp; 0&nbsp;&nbsp;96&nbsp;&nbsp; 0&nbsp;&nbsp; 0|4740k&nbsp;&nbsp;&nbsp;&nbsp;0 | 192B 2468B|&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 | 367&nbsp;&nbsp; 250 |2.41 2.36 1.42<br>&nbsp;&nbsp;1&nbsp;&nbsp; 1&nbsp;&nbsp; 0&nbsp;&nbsp;98&nbsp;&nbsp; 0&nbsp;&nbsp; 0|3048k&nbsp;&nbsp;&nbsp;&nbsp;0 |&nbsp;&nbsp;64B&nbsp;&nbsp;362B|&nbsp;&nbsp; 0&nbsp;&nbsp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bsp; 0&nbsp;&nbsp; 0|10.4M&nbsp;&nbsp;&nbsp;&nbsp;0 |&nbsp;&nbsp;64B&nbsp;&nbsp;346B|&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 | 413&nbsp;&nbsp; 403 |2.35 2.34 1.42<br>&nbsp;&nbsp;5&nbsp;&nbsp; 1&nbsp;&nbsp; 0&nbsp;&nbsp;93&nbsp;&nbsp; 1&nbsp;&nbsp; 0|13.0M&nbsp;&nbsp; 16k| 128B&nbsp;&nbsp;850B|&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 | 600&nbsp;&nbsp; 566 |2.32 2.34 1.42<br> 10&nbsp;&nbsp; 6&nbsp;&nbsp; 0&nbsp;&nbsp;85&nbsp;&nbsp; 0&nbsp;&nbsp; 0|7812k&nbsp;&nbsp;&nbsp;&nbsp;0 | 128B&nbsp;&nbsp;954B|&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 | 234&nbsp;&nbsp; 324 |2.32 2.34 1.42<br>&nbsp;&nbsp;1&nbsp;&nbsp; 0&nbsp;&nbsp; 0&nbsp;&nbsp;99&nbsp;&nbsp; 0&nbsp;&nbsp; 0| 644k&nbsp;&nbsp;&nbsp;&nbsp;0 | 234B&nbsp;&nbsp;898B|&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0 | 339&nbsp;&nbsp; 129 |2.32 2.34 1.42<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 ^^^^^<br><br>My cpu has been pegged due to wa for 10 minutes now.<br><br><br>&gt; I'm not sure how to discover which drive of an LVM array your file is stored<br>&gt; on, but I believe it will use all of the capacity of the "first" drive before<br>&gt; it stores anything on the second, so if this is a fairly new system it would<br>&gt; be reasonable to assume your second drive is not yet being used if the total<br>&gt; is less than 250GB.<br><br>I added the second drive in time for the winter olympics so I have more that<br>250G of recorded content.<br><br>Thanks<br>Daniel<br><br>_______________________________________________<br>mythtv-users mailing list<br>mythtv-users@mythtv.org<br><a target="_blank" href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br></div></div></div></div></body></html>