[plug] Stressing a disk

Richard Meyer meyerri at au1.ibm.com
Thu Jan 9 10:46:01 WST 2003


----- Forwarded by Richard Meyer/Australia/Contr/IBM on 09/01/2003 10:41 AM
-----
                                                                                                                                    
                      Derek Fountain                                                                                                
                      <derekfountain at ya        To:       plug at plug.linux.org.au                                                     
                      hoo.co.uk>               cc:                                                                                  
                                               Subject:  Re: [plug] Stressing a disk                                                
                      09/01/2003 11:31                                                                                              
                      AM                                                                                                            
                      Please respond to                                                                                             
                      plug                                                                                                          
                                                                                                                                    
                                                                                                                                    



>> Make two partitions of the same size and do:
>>
>> while true ; do
>>           dd if=/dev/hdN1 of=/dev/hdN2
>>           dd if=/dev/hdN2 of=/dev/hdN1
>>           md5sum /dev/hdN[12]
>> done
>>
>> where N is the approriate letter.  I have no idea how stressfull that is
on
>> a disk?  It looks bad tho.

>I like it! I don't think it's too stressful since all reads and writes
will be
>contiguous, and the kernel and disk between them will make full use of
large
>read ahead buffers and big write buffers. On the other hand, it'll read
and
>write all the sectors nicely, which is what I want. Thanks!

You might want to overwrite one partition with random stuff after every
cycle by using
dd if=/dev/urandom of=/dev/hdN1   (after the checksum).

The use of "urandom" instead of "random", means that the numbers are
generated faster, but less randomly. This might show up bad sectors better
(then again, maybe it won't), but it will slow it down.

Cheers
RichardM





More information about the plug mailing list