Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 12/06/2011, à 10:54

freddybidouille

[resolu]Conso de RAM à vide

Salut à tous,

Aujourd'hui je me rends compte que mon serveur de sauvegarde (sur lequel il y a d'installé pure-ftpd et unfs3) consomme énormément de ram pour rien :

fred@sauvegarde:/home/sauvvm$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   2796  1480 ?        Ss   May21   0:14 /sbin/init
root         2  0.0  0.0      0     0 ?        S    May21   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    May21   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S    May21   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    May21   0:00 [watchdog/0]
root         6  0.0  0.0      0     0 ?        S    May21   0:00 [migration/1]
root         7  0.0  0.0      0     0 ?        S    May21   0:00 [ksoftirqd/1]
root         8  0.0  0.0      0     0 ?        S    May21   0:00 [watchdog/1]
root         9  0.0  0.0      0     0 ?        S    May21   0:00 [migration/2]
root        10  0.0  0.0      0     0 ?        S    May21   0:00 [ksoftirqd/2]
root        11  0.0  0.0      0     0 ?        S    May21   0:00 [watchdog/2]
root        12  0.0  0.0      0     0 ?        S    May21   0:00 [migration/3]
root        13  0.0  0.0      0     0 ?        S    May21   0:03 [ksoftirqd/3]
root        14  0.0  0.0      0     0 ?        S    May21   0:00 [watchdog/3]
root        15  0.0  0.0      0     0 ?        S    May21   0:04 [events/0]
root        16  0.0  0.0      0     0 ?        S    May21   0:05 [events/1]
root        17  0.0  0.0      0     0 ?        S    May21   3:27 [events/2]
root        18  0.0  0.0      0     0 ?        S    May21   0:04 [events/3]
root        19  0.0  0.0      0     0 ?        S    May21   0:00 [cpuset]
root        20  0.0  0.0      0     0 ?        S    May21   0:00 [khelper]
root        21  0.0  0.0      0     0 ?        S    May21   0:00 [netns]
root        22  0.0  0.0      0     0 ?        S    May21   0:00 [async/mgr]
root        23  0.0  0.0      0     0 ?        S    May21   0:00 [pm]
root        25  0.0  0.0      0     0 ?        S    May21   0:01 [sync_supers]
root        26  0.0  0.0      0     0 ?        S    May21   0:01 [bdi-default]
root        27  0.0  0.0      0     0 ?        S    May21   0:00 [kintegrityd/0]
root        28  0.0  0.0      0     0 ?        S    May21   0:00 [kintegrityd/1]
root        29  0.0  0.0      0     0 ?        S    May21   0:00 [kintegrityd/2]
root        30  0.0  0.0      0     0 ?        S    May21   0:00 [kintegrityd/3]
root        31  0.0  0.0      0     0 ?        S    May21   0:00 [kblockd/0]
root        32  0.0  0.0      0     0 ?        S    May21   0:00 [kblockd/1]
root        33  0.0  0.0      0     0 ?        S    May21   0:00 [kblockd/2]
root        34  0.0  0.0      0     0 ?        S    May21   0:00 [kblockd/3]
root        35  0.0  0.0      0     0 ?        S    May21   0:00 [kacpid]
root        36  0.0  0.0      0     0 ?        S    May21   0:00 [kacpi_notify]
root        37  0.0  0.0      0     0 ?        S    May21   0:00 [kacpi_hotplug]
root        38  0.0  0.0      0     0 ?        S    May21   0:00 [ata/0]
root        39  0.0  0.0      0     0 ?        S    May21   0:00 [ata/1]
root        40  0.0  0.0      0     0 ?        S    May21   0:00 [ata/2]
root        41  0.0  0.0      0     0 ?        S    May21   0:00 [ata/3]
root        42  0.0  0.0      0     0 ?        S    May21   0:00 [ata_aux]
root        43  0.0  0.0      0     0 ?        S    May21   0:00 [ksuspend_usbd]
root        44  0.0  0.0      0     0 ?        S    May21   0:00 [khubd]
root        45  0.0  0.0      0     0 ?        S    May21   0:00 [kseriod]
root        46  0.0  0.0      0     0 ?        S    May21   0:00 [kmmcd]
root        51  0.0  0.0      0     0 ?        S    May21   0:00 [khungtaskd]
root        52  0.0  0.0      0     0 ?        S    May21   6:36 [kswapd0]
root        53  0.0  0.0      0     0 ?        SN   May21   0:00 [ksmd]
root        54  0.0  0.0      0     0 ?        S    May21   0:00 [aio/0]
root        55  0.0  0.0      0     0 ?        S    May21   0:00 [aio/1]
root        56  0.0  0.0      0     0 ?        S    May21   0:00 [aio/2]
root        57  0.0  0.0      0     0 ?        S    May21   0:00 [aio/3]
root        58  0.0  0.0      0     0 ?        S    May21   0:00 [ecryptfs-kthr]
root        59  0.0  0.0      0     0 ?        S    May21   0:00 [crypto/0]
root        60  0.0  0.0      0     0 ?        S    May21   0:00 [crypto/1]
root        61  0.0  0.0      0     0 ?        S    May21   0:00 [crypto/2]
root        62  0.0  0.0      0     0 ?        S    May21   0:00 [crypto/3]
root        74  0.0  0.0      0     0 ?        S    May21   0:00 [kstriped]
root        75  0.0  0.0      0     0 ?        S    May21   0:00 [kmpathd/0]
root        76  0.0  0.0      0     0 ?        S    May21   0:00 [kmpathd/1]
root        77  0.0  0.0      0     0 ?        S    May21   0:00 [kmpathd/2]
root        78  0.0  0.0      0     0 ?        S    May21   0:00 [kmpathd/3]
root        79  0.0  0.0      0     0 ?        S    May21   0:00 [kmpath_handle]
root        80  0.0  0.0      0     0 ?        S    May21   0:00 [ksnapd]
root        81  0.0  0.0      0     0 ?        S    May21   0:00 [kondemand/0]
root        82  0.0  0.0      0     0 ?        S    May21   0:00 [kondemand/1]
root        83  0.0  0.0      0     0 ?        S    May21   0:00 [kondemand/2]
root        84  0.0  0.0      0     0 ?        S    May21   0:00 [kondemand/3]
root        85  0.0  0.0      0     0 ?        S    May21   0:00 [kconservative]
root        86  0.0  0.0      0     0 ?        S    May21   0:00 [kconservative]
root        87  0.0  0.0      0     0 ?        S    May21   0:00 [kconservative]
root        88  0.0  0.0      0     0 ?        S    May21   0:00 [kconservative]
root       239  0.0  0.0      0     0 ?        S    May21   0:00 [scsi_eh_0]
root       240  0.0  0.0      0     0 ?        S    May21   0:00 [fw_event0]
root       241  0.0  0.0      0     0 ?        S    May21   0:00 [scsi_eh_1]
root       242  0.0  0.0      0     0 ?        S    May21   0:00 [scsi_eh_2]
root       243  0.0  0.0      0     0 ?        S    May21   0:00 [scsi_eh_3]
root       244  0.0  0.0      0     0 ?        S    May21   0:00 [scsi_eh_4]
root       245  0.0  0.0      0     0 ?        S    May21   0:00 [scsi_eh_5]
root       246  0.0  0.0      0     0 ?        S    May21   0:00 [scsi_eh_6]
root       256  0.0  0.0      0     0 ?        S    May21   0:00 [usbhid_resume]
root       276  0.0  0.0      0     0 ?        S    May21   0:06 [poll_0_status]
root       294  0.0  0.0      0     0 ?        S    May21   2:14 [jbd2/sda1-8]
root       295  0.0  0.0      0     0 ?        S    May21   0:00 [ext4-dio-unwr]
root       296  0.0  0.0      0     0 ?        S    May21   0:00 [ext4-dio-unwr]
root       297  0.0  0.0      0     0 ?        S    May21   0:00 [ext4-dio-unwr]
root       298  0.0  0.0      0     0 ?        S    May21   0:00 [ext4-dio-unwr]
root       342  0.0  0.0   2316   596 ?        S    May21   0:00 upstart-udev-br
root       344  0.0  0.0   2580   864 ?        S<s  May21   0:00 udevd --daemon
daemon     599  0.0  0.0   1896   520 ?        Ss   May21   0:00 portmap
root       607  0.0  0.0   2576   740 ?        S<   May21   0:00 udevd --daemon
root       609  0.0  0.0   2576   724 ?        S<   May21   0:00 udevd --daemon
root       714  0.0  0.0   5552  1244 ?        Ss   May21   0:39 /usr/sbin/sshd
root       717  0.0  0.0      0     0 ?        S    May21   0:00 [rpciod/0]
root       718  0.0  0.0      0     0 ?        S    May21   0:00 [rpciod/1]
root       719  0.0  0.0      0     0 ?        S    May21   0:00 [rpciod/2]
root       720  0.0  0.0      0     0 ?        S    May21   0:00 [rpciod/3]
syslog     733  0.0  0.0  35556  1404 ?        Sl   May21   1:28 rsyslogd -c4
statd      755  0.0  0.0   1968   632 ?        Ss   May21   0:00 rpc.statd -L
root       756  0.0  0.0      0     0 ?        S    May21   0:00 [nfsiod]
root       763  0.0  0.0   2372   480 ?        Ss   May21   0:00 rpc.idmapd
root       791  0.0  0.0   1792   496 tty4     Ss+  May21   0:00 /sbin/getty -8
root       796  0.0  0.0   1792   496 tty5     Ss+  May21   0:00 /sbin/getty -8
root       810  0.0  0.0   1792   496 tty2     Ss+  May21   0:00 /sbin/getty -8
root       812  0.0  0.0   1792   500 tty3     Ss+  May21   0:00 /sbin/getty -8
root       815  0.0  0.0   1792   500 tty6     Ss+  May21   0:00 /sbin/getty -8
daemon     817  0.0  0.0   2248   428 ?        Ss   May21   0:00 atd
root       818  0.0  0.0   2376   748 ?        Ss   May21   0:00 cron
root       842  0.0  0.0   2828   536 ?        Ss   May21   0:54 /usr/sbin/irqba
root      1283  0.0  0.0      0     0 ?        S    May21   0:00 [lockd]
root      1284  0.0  0.0      0     0 ?        S    May21   0:00 [nfsd4]
root      1285  0.0  0.0      0     0 ?        S    May21   0:32 [nfsd]
root      1286  0.0  0.0      0     0 ?        S    May21   0:41 [nfsd]
root      1287  0.0  0.0      0     0 ?        S    May21   0:32 [nfsd]
root      1288  0.0  0.0      0     0 ?        S    May21   0:37 [nfsd]
root      1289  0.0  0.0      0     0 ?        S    May21   0:30 [nfsd]
root      1290  0.0  0.0      0     0 ?        S    May21   0:37 [nfsd]
root      1291  0.0  0.0      0     0 ?        S    May21   0:28 [nfsd]
root      1292  0.0  0.0      0     0 ?        S    May21   0:32 [nfsd]
root      1296  0.0  0.0   2292  1000 ?        Ss   May21   0:00 /usr/sbin/rpc.m
root     24588  0.0  0.0      0     0 ?        S    04:00   0:00 [flush-8:0]
root     25440  0.0  0.0   4212   724 ?        Ss   06:32   0:00 pure-ftpd (SERV
root     28652  0.0  0.0   8356  2740 ?        Ss   10:30   0:00 sshd: fred [pri
fred     28729  0.0  0.0   8356  1472 ?        S    10:30   0:00 sshd: fred@pts/
fred     28732  0.0  0.0   5520  2880 pts/0    Ss   10:30   0:00 -bash
root     28747  0.0  0.0   4040  1280 pts/0    S    10:30   0:00 su
root     28750  0.0  0.0   4552  1832 pts/0    S    10:30   0:00 bash
root     28760  0.0  0.0   1792   568 tty1     Ss+  10:30   0:00 /sbin/getty -8
root     28765  0.2  0.0  29396  3636 pts/0    Sl+  10:30   0:01 iftop
root     28885  0.0  0.0   8356  2736 ?        Ss   10:41   0:00 sshd: fred [pri
fred     28959  0.0  0.0   8488  1484 ?        S    10:41   0:00 sshd: fred@pts/
fred     28960  0.0  0.0   5520  2888 pts/1    Ss   10:41   0:00 -bash
root     28999  0.0  0.0   7140  2604 ?        Ss   10:43   0:00 sshd: unknown [
sshd     29000  0.0  0.0   6896  1228 ?        S    10:43   0:00 sshd: unknown [
fred     29001  0.0  0.0   2716  1056 pts/1    R+   10:43   0:00 ps aux
fred@sauvegarde:/home/sauvvm$ free -m
             total       used       free     shared    buffers     cached
Mem:          3949       3833        115          0         40       3598
-/+ buffers/cache:        195       3753
Swap:         8830          0       8830

Je précise qu'il a 4Go de ram et que tout est consommé par... aucun processus (tous les processus sont à 0.0% d'utilisation mémoire (ou presque)).

Deux solutions : soit y a un gros problème, soit tous les processus ne sont pas listés...

Merci d'avance de votre aide!
Fred

Dernière modification par freddybidouille (Le 12/06/2011, à 11:38)

Hors ligne

#2 Le 12/06/2011, à 11:03

Hoper

Re : [resolu]Conso de RAM à vide

-/+ buffers/cache:        195       3753

Il te reste 3753 Mo de "libre". (=Disponible si un programme en fait la demande) En fait, (3833-195=3638 Mo) sont utilisés pour du cache. Ce qui est assez logique puisque ton serveur doit passer son temps à lire et à écrire de gros fichiers. Donc il met en cache un maximum de chose. C'est plus intelligent que de ne rien faire de ces 4 Go non ?


Mes tutos et coups de gueule :
http://hoper.dnsalias.net/atdc/
Mastodon: @hoper@framapiaf.org

Hors ligne

#3 Le 12/06/2011, à 11:07

pode

Re : [resolu]Conso de RAM à vide

freddybidouille a écrit :
fred@sauvegarde:/home/sauvvm$ free -m
             total       used       free     shared    buffers     cached
Mem:          3949       3833        115          0         40       3598
-/+ buffers/cache:        195       3753
Swap:         8830          0       8830

Troisième solution : il n'y a pas de problème !!!

Le système d'exploitation Linux est prévu pour charger en mémoire des librairies dont il n'a pas forcément besoin, mais dont il pense qu'elles pourraient être utiles ultérieurement. Si cette utilité est avérée plus tard, cela permet de diminuer le délai de chargement de ces librairies.
C'est ce qu'on voit dans les colonnes buffers et cached.

Bien sûr, si, à un moment donné, le système a besoin de beaucoup de mémoire et que les éléments dont il a besoin ne sont pas dans le cache, Linux va vider le cache.

Rassure-toi, tu as en fait 3753 Mo de libre (115+40+3598), qu'on voit dans la ligne -/+ buffers/cache et la colonne free

Zut : grillé !!!

Dernière modification par pode (Le 12/06/2011, à 11:07)

Hors ligne

#4 Le 12/06/2011, à 11:13

freddybidouille

Re : [resolu]Conso de RAM à vide

Lol, je ne le lisait pas comme ça !

pourtant la commande TOP elle ne dis pas ça :

top - 11:07:38 up 21 days, 16:47,  2 users,  load average: 0.01, 0.95, 0.92
Tasks: 133 total,   1 running, 132 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4043828k total,  3927952k used,   115876k free,    16708k buffers
Swap:  9042936k total,        0k used,  9042936k free,  3788520k cached

A moins que je me trompe c'est le SWAP qui a 3.7Go de "cached" ?!

edit : en tout cas merci de votre réponse rapdie!

Dernière modification par freddybidouille (Le 12/06/2011, à 11:14)

Hors ligne

#5 Le 12/06/2011, à 11:18

pode

Re : [resolu]Conso de RAM à vide

freddybidouille a écrit :
top - 11:07:38 up 21 days, 16:47,  2 users,  load average: 0.01, 0.95, 0.92
Tasks: 133 total,   1 running, 132 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4043828k total,  3927952k used,   115876k free,    16708k buffers
Swap:  9042936k total,        0k used,  9042936k free,  3788520k cached

A moins que je me trompe c'est le SWAP qui a 3.7Go de "cached" ?!

Le champ cached de la ligne swap doit correspondre à la RAM qui est du cache.
Car on n'a vraiment aucune raison d'avoir du cache en swap : le swap, c'est de la mémoire stockée sur disque, donc en terme de performance, c'est catastrophique par rapport à la RAM...

Hors ligne

#6 Le 12/06/2011, à 11:37

freddybidouille

Re : [resolu]Conso de RAM à vide

D'accord, ça doit être pour ça que j'ai mal lu!

merci à tous!

Hors ligne

#7 Le 12/06/2011, à 12:27

src

Re : [resolu]Conso de RAM à vide

Utilise htop (dispo dans les dépôts). Il est bien plus clair et t'affichera la ram dispo.


Actuellement sur Manjaro Xfce (amd64)

Hors ligne

#8 Le 12/06/2011, à 14:00

Hoper

Re : [resolu]Conso de RAM à vide

La commande top dit exactement la meme chose que la première ligne de la commande free...


Mes tutos et coups de gueule :
http://hoper.dnsalias.net/atdc/
Mastodon: @hoper@framapiaf.org

Hors ligne