Reglages optimaux vive le tuning !!

Reglages optimaux vive le tuning !! - Linux et OS Alternatifs

Marsh Posté le 03-09-2002 à 16:29:50    

j aimerais savoir ts les bons trucs a connaitre pr booster un systeme nunux en software (cad sans rien rajouter "en dur" dans la boiboite  :D ) notamment quels sont vos reglages les plus efficaces pr ls fichiers de /proc/sys/vm ??? ds reglages concernant d autres parties du systeme sont bien evidemment les bienvenus aussi !!!
 
d avance merci  :jap:


---------------
"C'est toujours gentil un texte !!"
Reply

Marsh Posté le 03-09-2002 à 16:29:50   

Reply

Marsh Posté le 03-09-2002 à 20:42:16    

- hdparm avec au moins -u1 -d1
- partitions montees en noatime
- softupdates (sur les bsd), notail (reiserfs), data=writeback (ext3), journal plus gros (xfs, jfs) .
- pour la vm : echo 90 500 0 0 500 8400 98 20 0 > /proc/sys/vm/bdflush


---------------
C'est en forgeant qu'on devient con comme un forgeron.
Reply

Marsh Posté le 03-09-2002 à 21:55:49    

axey a écrit a écrit :

  • pour la vm : echo 90 500 0 0 500 8400 98 20 0 > /proc/sys/vm/bdflush




ce qui a pour effet de ...???

Reply

Marsh Posté le 03-09-2002 à 22:36:37    

Martinez a écrit a écrit :

ce qui a pour effet de ...???




 
+1 [:wam]  
et le noatime aussi, je connais pas (pas trouver dans le man de mount) [:claire_redfield]

Reply

Marsh Posté le 03-09-2002 à 22:37:21    

+1

Reply

Marsh Posté le 03-09-2002 à 22:39:36    

djoh a écrit a écrit :

et le noatime aussi, je connais pas (pas trouver dans le man de mount) [:claire_redfield]


Ça ne met pas à jour l'heure de dernier accès des fichiers. Sur /usr, ça vaut le coup, mais sur /var par exemple, c'est à éviter.


---------------
« No question is too silly to ask, but, of course, some are too silly to answer. » -- Perl book
Reply

Marsh Posté le 03-09-2002 à 22:44:13    

Jar Jar a écrit a écrit :

Ça ne met pas à jour l'heure de dernier accès des fichiers. Sur /usr, ça vaut le coup, mais sur /var par exemple, c'est à éviter.




 
ah oui, j'ai déjà lu ça qq'part ... bizarre que j'ai pas trouvé dans le man  :??:  
et sinon, ça doit pas être flagrant, si ?

Reply

Marsh Posté le 03-09-2002 à 22:46:55    

             noatime
                     Do not update inode access  times  on  this  file  system
                     (e.g,  for  faster  access  on the news spool to speed up
                     news servers).


---------------
« No question is too silly to ask, but, of course, some are too silly to answer. » -- Perl book
Reply

Marsh Posté le 03-09-2002 à 22:50:24    

Jar Jar a écrit a écrit :

             noatime
                     Do not update inode access  times  on  this  file  system
                     (e.g,  for  faster  access  on the news spool to speed up
                     news servers).






 
ah ouai, c'est bien pour un serveur ... bon bah moi c'est une workstation et une passerelle que j'ai donc faudra que j'aille voir ailleurs  :)  
 
par contre je vois pas où t'as trouver ça
je suis dans le "man 8 mount", et je tappe "/noatime" et il me trouve rien  :o


---------------
http://membres.lycos.fr/djohdjoh http://www.enduring-freedoms.org/sommaire.php3
Reply

Marsh Posté le 03-09-2002 à 22:52:48    

djoh a écrit a écrit :

par contre je vois pas où t'as trouver ça
je suis dans le "man 8 mount", et je tappe "/noatime" et il me trouve rien  :o


C'est ptêt la version traduite qui est moins complète...


---------------
« No question is too silly to ask, but, of course, some are too silly to answer. » -- Perl book
Reply

Marsh Posté le 03-09-2002 à 22:52:48   

Reply

Marsh Posté le 03-09-2002 à 22:54:33    

djoh a écrit a écrit :

ah ouai, c'est bien pour un serveur ... bon bah moi c'est une workstation et une passerelle que j'ai donc faudra que j'aille voir ailleurs  :)


Et puis pour préciser, c'est de manière générale quand tu as besoin d'accéder en lecture à beaucoup de petits fichiers. Dans ce cas, on commence bien évidemment par utiliser reiserfs, mais c'est un plus.


---------------
« No question is too silly to ask, but, of course, some are too silly to answer. » -- Perl book
Reply

Marsh Posté le 03-09-2002 à 23:03:30    

Jar Jar a écrit a écrit :

C'est ptêt la version traduite qui est moins complète...




 
ah ouai tiens, j'ai la version française ... c'est pas terrible ça  :/


---------------
http://membres.lycos.fr/djohdjoh http://www.enduring-freedoms.org/sommaire.php3
Reply

Marsh Posté le 03-09-2002 à 23:04:56    

axey a écrit a écrit :

...
data=writeback (ext3), journal plus gros (xfs, jfs) .




c koa ça ?

Reply

Marsh Posté le 03-09-2002 à 23:07:33    

*/ partoches en noatime, data=writeback (ext3)
*/ hdparm
*/ j'utilise des progs un minimum optimisés, genre pour les logs j'utilise metalog, ...
*/ Je stripe tous mes binaires/lib/... (pas fait sur toutes les distros)
*/ recompile du kernel aux petits oignons
*/ gros travaux dans un ramdisk
*/ ...


---------------
-- NO SLACKERS - violators will be fsck'd & tar'd
Reply

Marsh Posté le 03-09-2002 à 23:21:47    

le sot zi a écrit a écrit :

 
c koa ça ?




 
 
regarde là, c'est bien expliqué : http://www.linux-france.org/article/sys/ext3fs/
 
c'est l'ordre de gestion d'écriture des données sur le disque (méta données, avant ou après donées ...)


---------------
http://membres.lycos.fr/djohdjoh http://www.enduring-freedoms.org/sommaire.php3
Reply

Marsh Posté le 03-09-2002 à 23:25:08    

djoh a écrit a écrit :

 
 
 
regarde là, c'est bien expliqué : http://www.linux-france.org/article/sys/ext3fs/
 
c'est l'ordre de gestion d'écriture des données sur le disque (méta données, avant ou après donées ...)



marchiiiiiiiiiiiiiiiiii

Reply

Marsh Posté le 04-09-2002 à 00:37:28    

PinG a écrit a écrit :

*/ partoches en noatime, data=writeback (ext3)
*/ hdparm
*/ j'utilise des progs un minimum optimisés, genre pour les logs j'utilise metalog, ...
*/ Je stripe tous mes binaires/lib/... (pas fait sur toutes les distros)
*/ recompile du kernel aux petits oignons
*/ gros travaux dans un ramdisk
*/ ...




*/ elvtune :D


---------------
-- NO SLACKERS - violators will be fsck'd & tar'd
Reply

Marsh Posté le 04-09-2002 à 13:11:25    

Citation :

softupdates (sur les bsd), notail (reiserfs)


 
 :??: comprends pas !!!! chuis tt jeune newbie moa fo pas aller trop vite  :D !!!! bon et sinon qqn saurait pkoi il me mank le fichier /proc/sys/vm/buffermem ??? j ai la RH 7.3 et il en parle dans le reference guide alors pkoi je l ai pas moi  :fou: !!!
et le ramdisk kesako ???? (j ai peur de me faire assassiner pr cette question  :lol: )
 
d avancer merci  :jap:


---------------
"C'est toujours gentil un texte !!"
Reply

Marsh Posté le 04-09-2002 à 14:11:14    

axey a écrit a écrit :

 
- pour la vm : echo 90 500 0 0 500 8400 98 20 0 > /proc/sys/vm/bdflush
 




 
j'attends toujours une expication sur ce truc là  :o
 
 
EDIT : j'ai bien compris que c'est un réglage de cache mémoire, mais je vois pas lequel (réglage)


Message édité par djoh le 04-09-2002 à 14:13:33
Reply

Marsh Posté le 04-09-2002 à 14:40:46    

+1


---------------
"C'est toujours gentil un texte !!"
Reply

Marsh Posté le 04-09-2002 à 17:57:21    

+1


---------------
Ne remets pas à demain ce que tu peux faire après-demain ! :sol:
Reply

Marsh Posté le 04-09-2002 à 18:13:28    

ah c'est facile de venir frimer avec un réglage trouvé je ne sais où si on est pas capable de l'expliquer  :o

Reply

Marsh Posté le 04-09-2002 à 18:59:36    

Citation :

The files in this directory can be used to tune the operation
of the virtual memory (VM) subsystem of the Linux kernel, and
one of the files (bdflush) also has a little influence on disk
usage.
 
Default values and initialization routines for most of these
files can be found in mm/swap.c.
 
Currently, these files are in /proc/sys/vm:
- bdflush
- buffermem
- freepages
- kswapd
- overcommit_memory
- page-cluster
- pagecache
- pagetable_cache
 
==============================================================
 
bdflush:
 
This file controls the operation of the bdflush kernel
daemon. The source code to this struct can be found in
linux/mm/buffer.c. It currently contains 9 integer values,
of which 6 are actually used by the kernel.
 
From linux/fs/buffer.c:
--------------------------------------------------------------
union bdflush_param{
    struct {
        int nfract;      /* Percentage of buffer cache dirty to
                            activate bdflush */
        int ndirty;      /* Maximum number of dirty blocks to
                            write out per wake-cycle */
        int nrefill;     /* Number of clean buffers to try to
                            obtain each time we call refill */
        int nref_dirt;   /* Dirty buffer threshold for activating
                            bdflush when trying to refill buffers. */
        int dummy1;      /* unused */
        int age_buffer;  /* Time for normal buffer to age before
                            we flush it */
        int age_super;   /* Time for superblock to age before we
                            flush it */
        int dummy2;      /* unused */
        int dummy3;      /* unused */
    } b_un;
    unsigned int data[N_PARAM];
} bdf_prm = {{40, 500, 64, 256, 15, 30*HZ, 5*HZ, 1884, 2}};
--------------------------------------------------------------
 
The first parameter governs the maximum number of dirty
buffers in the buffer cache. Dirty means that the contents
of the buffer still have to be written to disk (as opposed
to a clean buffer, which can just be forgotten about).
Setting this to a high value means that Linux can delay disk
writes for a long time, but it also means that it will have
to do a lot of I/O at once when memory becomes short. A low
value will spread out disk I/O more evenly.
 
The second parameter (ndirty) gives the maximum number of
dirty buffers that bdflush can write to the disk in one time.
A high value will mean delayed, bursty I/O, while a small
value can lead to memory shortage when bdflush isn't woken
up often enough...
 
The third parameter (nrefill) is the number of buffers that
bdflush will add to the list of free buffers when
refill_freelist() is called. It is necessary to allocate free
buffers beforehand, since the buffers often are of a different
size than memory pages and some bookkeeping needs to be done
beforehand. The higher the number, the more memory will be
wasted and the less often refill_freelist() will need to run.
 
When refill_freelist() comes across more than nref_dirt dirty
buffers, it will wake up bdflush.
 
Finally, the age_buffer and age_super parameters govern the
maximum time Linux waits before writing out a dirty buffer
to disk. The value is expressed in jiffies (clockticks), the
number of jiffies per second is 100, except on Alpha machines
(1024). Age_buffer is the maximum age for data blocks, while
age_super is for filesystem metadata.
 
==============================================================
buffermem:
 
The three values in this file correspond to the values in
the struct buffer_mem. It controls how much memory should
be used for buffer memory. The percentage is calculated
as a percentage of total system memory.
 
The values are:
min_percent -- this is the minimum percentage of memory
     that should be spent on buffer memory
borrow_percent  -- UNUSED
max_percent     -- UNUSED
 
==============================================================
freepages:
 
This file contains the values in the struct freepages. That
struct contains three members: min, low and high.
 
The meaning of the numbers is:
 
freepages.min When the number of free pages in the system
  reaches this number, only the kernel can
  allocate more memory.
freepages.low If the number of free pages gets below this
  point, the kernel starts swapping aggressively.
freepages.high The kernel tries to keep up to this amount of
  memory free; if memory comes below this point,
  the kernel gently starts swapping in the hopes
  that it never has to do real aggressive swapping.
 
==============================================================
 
kswapd:
 
Kswapd is the kernel swapout daemon. That is, kswapd is that
piece of the kernel that frees memory when it gets fragmented
or full. Since every system is different, you'll probably want
some control over this piece of the system.
 
The numbers in this page correspond to the numbers in the
struct pager_daemon {tries_base, tries_min, swap_cluster
}; The tries_base and swap_cluster probably have the
largest influence on system performance.
 
tries_base The maximum number of pages kswapd tries to
  free in one round is calculated from this
  number. Usually this number will be divided
  by 4 or 8 (see mm/vmscan.c), so it isn't as
  big as it looks.
  When you need to increase the bandwidth to/from
  swap, you'll want to increase this number.
tries_min This is the minimum number of times kswapd
  tries to free a page each time it is called.
  Basically it's just there to make sure that
  kswapd frees some pages even when it's being
  called with minimum priority.
swap_cluster This is the number of pages kswapd writes in
  one turn. You want this large so that kswapd
  does it's I/O in large chunks and the disk
  doesn't have to seek often, but you don't want
  it to be too large since that would flood the
  request queue.
 
==============================================================
 
overcommit_memory:
 
This value contains a flag that enables memory overcommitment.
When this flag is 0, the kernel checks before each malloc()
to see if there's enough memory left. If the flag is nonzero,
the system pretends there's always enough memory.
 
This feature can be very useful because there are a lot of
programs that malloc() huge amounts of memory "just-in-case"
and don't use much of it.
 
Look at: mm/mmap.c::vm_enough_memory() for more information.
 
==============================================================
 
page-cluster:
 
The Linux VM subsystem avoids excessive disk seeks by reading
multiple pages on a page fault. The number of pages it reads
is dependent on the amount of memory in your machine.
 
The number of pages the kernel reads in at once is equal to
2 ^ page-cluster. Values above 2 ^ 5 don't make much sense
for swap because we only cluster swap data in 32-page groups.
 
==============================================================
 
pagecache:
 
This file does exactly the same as buffermem, only this
file controls the struct page_cache, and thus controls
the amount of memory used for the page cache.
 
In 2.2, the page cache is used for 3 main purposes:
- caching read() data from files
- caching mmap()ed data and executable files
- swap cache
 
When your system is both deep in swap and high on cache,
it probably means that a lot of the swapped data is being
cached, making for more efficient swapping than possible
with the 2.0 kernel.
 
==============================================================
 
pagetable_cache:
 
The kernel keeps a number of page tables in a per-processor
cache (this helps a lot on SMP systems). The cache size for
each processor will be between the low and the high value.
 
On a low-memory, single CPU system you can safely set these
values to 0 so you don't waste the memory. On SMP systems it
is used so that the system can do fast pagetable allocations
without having to acquire the kernel memory lock.
 
For large systems, the settings are probably OK. For normal
systems they won't hurt a bit. For small systems (<16MB ram)
it might be advantageous to set both values to 0.


 
ne me dites pas qu'il y en a pas un seul d'entre vous qui a les sources du kernel dans son /usr/src  
 :heink:


---------------
-- NO SLACKERS - violators will be fsck'd & tar'd
Reply

Marsh Posté le 04-09-2002 à 19:00:45    

PS : si vous lisez attentivement, c'est facile à comprendre...


---------------
-- NO SLACKERS - violators will be fsck'd & tar'd
Reply

Marsh Posté le 04-09-2002 à 19:01:31    

PinG a écrit a écrit :

 
ne me dites pas qu'il y en a pas un seul d'entre vous qui a les sources du kernel dans son /usr/src  
 :heink:  




 
je répète : je veux juste savoir ce que vont faire les VALEURS qu'à donner axey, ... pour l'utiliter de bdflush et autre, google m'a déjà renseigné :o

Reply

Marsh Posté le 04-09-2002 à 19:02:18    

dans le même genre, allez faire un tour dans /usr/src/linux/Documentation/sysctl


---------------
-- NO SLACKERS - violators will be fsck'd & tar'd
Reply

Marsh Posté le 04-09-2002 à 19:03:21    

m'enfin bon, ça doit avoir encore moins d'impact que noatime sur un pc qui sert de workstation donc bon ...

Reply

Marsh Posté le 04-09-2002 à 19:08:05    

djoh a écrit a écrit :

 
 
je répète : je veux juste savoir ce que vont faire les VALEURS qu'à donner axey, ... pour l'utiliter de bdflush et autre, google m'a déjà renseigné :o  



on se la refait au ralentit :
Bah il vas rarement vider les buffers, mais quand il le fait, c'est par gros blocks, tout en gardant un peut de buffers libres au cas ou on en aurais besoin. Moins d'écritures disques répétées, mais des grosses écritures disque d'un coup, donc de meilleures perfs...
vala.


---------------
-- NO SLACKERS - violators will be fsck'd & tar'd
Reply

Marsh Posté le 04-09-2002 à 19:10:22    

djoh a écrit a écrit :

m'enfin bon, ça doit avoir encore moins d'impact que noatime sur un pc qui sert de workstation donc bon ...



en workstation, c'est clair que ca sert pas à grand chose, à moins que tu ne recompiles beaucoup... CA sert éventuelement à palier la perte de vitesse de l'ext3 due à l'écriture en double des méta-données, et encore...
 
... mais par exemple pour un serveur de mail ca a clairement l'uv...


Message édité par PinG le 04-09-2002 à 19:10:50

---------------
-- NO SLACKERS - violators will be fsck'd & tar'd
Reply

Marsh Posté le 04-09-2002 à 19:55:24    

Met ton swap en ramdisk, ça boost les perfs :pt1cable:

Reply

Marsh Posté le 04-09-2002 à 20:00:49    

matafan a écrit a écrit :

Met ton swap en ramdisk, ça boost les perfs :pt1cable:




 
 :lol:

Reply

Marsh Posté le 04-09-2002 à 20:04:50    

http://www.linuxjournal.com//print.php?sid=5886 -> ca pue, en plus les options qu'ils filent pour gcc  :heink:  
http://lea-linux.org/admin/optimise.php3 -> pas mal mais rien de bien transcendant (beaucoup de sysctl, de HDparm, ...)
http://linuxperf.nl.linux.org/ -> y'a a boire et à manger...
http://linux.oreillynet.com/pub/a/ [...] tency.html -> la meilleure de toute à mon sens...


---------------
-- NO SLACKERS - violators will be fsck'd & tar'd
Reply

Marsh Posté le 05-09-2002 à 12:53:23    

merci les gars pr ttes ces infos :jap: (et pr l explication des params de bdflush jl ai avait lu dans le reference guide de la RH 7.3 mais c etait pas tres clair  :heink: )  
eskil existe d autre trucs a savoir (pas ke sur la vm) pr augmenter les perfs ???
et je reitere ma question sur le ramdisk :D !!!!
ah vi et j essaierais d updater mes posts un pe plus souvent :ange: !!!!


---------------
"C'est toujours gentil un texte !!"
Reply

Marsh Posté le 05-09-2002 à 13:04:37    

RTFM :)
 
Sinon le noatime c'est interresant _tout le temps_, car sinon au moindre acces sur un fichier, la repertoire parent va aussi voir sa date changee. A part xbiff, je ne connais aucun soft necessitant ca de nos jours. Ca permet aussi d'avoir son disque dur en veille plus souvent (pratique pour une passerelle avec un dur bruyant) .
 
Sinon evidemment quelque soit l'OS : mettre /tmp en tmpfs (alias 'mfs' sous BSD) ;
 


---------------
C'est en forgeant qu'on devient con comme un forgeron.
Reply

Marsh Posté le 05-09-2002 à 14:05:05    

axey a écrit a écrit :

Sinon evidemment quelque soit l'OS : mettre /tmp en tmpfs (alias 'mfs' sous BSD) ;



ca sert a quoi ?

Reply

Marsh Posté le 05-09-2002 à 14:53:04    

A diviser par 2 les temps de compile :)


---------------
C'est en forgeant qu'on devient con comme un forgeron.
Reply

Marsh Posté le 05-09-2002 à 15:03:48    

axey a écrit a écrit :

A diviser par 2 les temps de compile :)




 
 [:wam]  
on va faire ça alors  :D  
combien il faut de place à peu près ? (doit falloir bcp parfois non ? :o )

Reply

Marsh Posté le 05-09-2002 à 15:25:14    

axey a écrit a écrit :

A diviser par 2 les temps de compile :)


Mais bien sûr.


---------------
« No question is too silly to ask, but, of course, some are too silly to answer. » -- Perl book
Reply

Marsh Posté le 05-09-2002 à 17:24:16    

axey a écrit a écrit :

A diviser par 2 les temps de compile :)



ca falloir m'expliquer la magie là...

Reply

Marsh Posté le    

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed