[hack] Re: Linux su vecchi pc

Alberto Ciampini a.ciampini@sicep.it
Ven 8 Set 2006 17:03:43 CEST


Hal wrote:

>Ci sono altre opzioni "mai più senza"?
>  
>
si, c'è l'opzione -rtfm ........ :-P

ok... a parte le battute....... da una rapida lettura del man, le 
opzioni più interessanti secondo me sono quelle che ho riportato quà 
sotto, però non ho tempo di provarle adesso........... e non è nemmeno 
detto che sia l'elenco completo di quelle utili per aumentare le 
performance del disco........... :-[

       -a     Get/set  sector count for filesystem read-ahead.  This is 
used to improve performance in sequential
              reads of large files, by prefetching additional blocks in 
anticipation of them being needed by  the
              running  task.   In  the  current  kernel  version 
(2.0.10) this has a default setting of 8 sectors
              (4KB).  This value seems good for most purposes, but in a 
system where most file accesses are  ran-
              dom  seeks,  a smaller setting might provide better 
performance.  Also, many IDE drives also have a
              separate built-in read-ahead function, which alleviates 
the need for  a  filesystem  read-ahead  in
              many situations.

       -A     Disable/enable the IDE drive's read-lookahead feature 
(usually ON by default).

       -d     Disable/enable the "using_dma" flag for this drive.  This 
option now works with  most  combinations
              of drives and PCI interfaces which support DMA and which 
are known to the IDE driver.  It is also a
              good idea to use the appropriate -X option in combination 
with -d1 to ensure that the drive  itself
              is  programmed  for  the correct DMA mode, although most 
BIOSs should do this for you at boot time.
              Using DMA nearly always gives the best performance, with 
fast I/O throughput  and  low  CPU  usage.
              But there are at least a few configurations of chipsets 
and drives for which DMA does not make much
              of a difference, or may even slow things down (on really 
messed up hardware!).   Your  mileage  may
              vary.

       -m     Get/set sector count for multiple sector I/O on the 
drive.  A setting of 0 disables  this  feature.
              Multiple  sector mode (aka IDE Block Mode), is a feature 
of most modern IDE hard drives, permitting
              the transfer of multiple sectors per I/O interrupt, rather 
than the usual one sector per interrupt.
              When  this  feature  is  enabled,  it  typically  reduces 
operating system overhead for disk I/O by
              30-50%.  On many systems, it also provides increased data 
throughput of anywhere from  5%  to  50%.
              Some  drives,  however  (most  notably the WD Caviar 
series), seem to run slower with multiple mode
              enabled.  Your mileage may vary.  Most drives support the 
minimum settings of 2, 4, 8, or 16  (sec-
              tors).   Larger settings may also be possible, depending 
on the drive.  A setting of 16 or 32 seems
              optimal on many systems.  Western Digital recommends lower 
settings of 4 to  8  on  many  of  their
              drives,  due  tiny (32kB) drive buffers and non-optimized 
buffering algorithms.  The -i flag can be
              used to find the maximum setting supported by an installed 
drive (look for MaxMultSect in the  out-
              put).  Some drives claim to support multiple mode, but 
lose data at some settings.  Under rare cir-
              cumstances, such failures can result in massive filesystem 
corruption.

       -u     Get/set  interrupt-unmask  flag  for  the drive.  A 
setting of 1 permits the driver to unmask other
              interrupts during processing of a disk interrupt, which 
greatly improves Linux's responsiveness and
              eliminates "serial port overrun" errors.  Use this feature 
with caution: some drive/controller com-
              binations do not tolerate the increased I/O  latencies  
possible  when  this  feature  is  enabled,
              resulting  in  massive filesystem corruption.  In 
particular, CMD-640B and RZ1000 (E)IDE interfaces
              can be unreliable (due to a hardware flaw) when this 
option is used with  kernel  versions  earlier
              than  2.0.13.  Disabling the IDE prefetch feature of these 
interfaces (usually a BIOS/CMOS setting)
              provides a safe fix for the problem for use with earlier 
kernels.

       -X     Set the IDE transfer mode for newer (E)IDE/ATA2 drives.  
This is typically used in combination with
              -d1  when  enabling  DMA  to/from  a  drive on a supported 
interface chipset, where -X34 is used to
              select multiword DMA mode2 transfers.  With systems which 
support UltraDMA burst timings,  -X66  is
              used  to  select  UltraDMA mode2 transfers (you'll need to 
prepare the chipset for UltraDMA before-
              hand).  Apart from that, use of this flag is seldom 
necessary  since  most/all  modern  IDE  drives
              default  to  their  fastest PIO transfer mode at 
power-on.  Fiddling with this can be both needless
              and risky.  On drives which support alternate transfer 
modes, -X can be used to switch the mode  of
              the  drive only.  Prior to changing the transfer mode, the 
IDE interface should be jumpered or pro-
              grammed (see -p flag) for the new mode setting to prevent 
loss and/or corruption of data.  Use this
              with  extreme  caution!   For  the PIO (Programmed 
Input/Output) transfer modes used by Linux, this
              value is simply the desired PIO mode number plus 8.  Thus, 
a value of 09 sets PIO mode1, 10 enables
              PIO  mode2,  and  11 selects PIO mode3.  Setting 00 
restores the drive's "default" PIO mode, and 01
              disables IORDY.  For multiword DMA, the value used is the 
desired DMA mode  number  plus  32.   for
              UltraDMA, the value is the desired UltraDMA mode number 
plus 64.

-- 
alberto ciampini
a.ciampini@sicep.it




Maggiori informazioni sulla lista golem-hack