Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

comportement en charge

2 réponses
Avatar
Mihamina Rakotomandimby
Bonjour,

Pour le fun, je lance un script assez lourd pour la machine.
J'ai 15.000 fichiers tous différents Jpeg de 100Ko en moyenne.
"convert", un utilitaire dans ImageMagick.


Le script:

#!/bin/sh
convert /path/to/file1.jpg /path/to/file1.png &
convert /path/to/file2.jpg /path/to/file2.png &
convert /path/to/file3.jpg /path/to/file3.png &
[...]
convert /path/to/file15000.jpg /path/to/file15000.png

Un "du" approximatif () sur ces fichiers donne à peu pres 2Go.
Je lance le script, et évidemment, j'ai beaucoup de processes "convert"
qui sont lancés. Mais pas 15000.... environ 50 "seulement" (vérifié avec
pgrep convert | wc -l). La machine reste réactive, certainement à cause
ou grace au fait que seuls 50 processes de convert sont lancés.

De plus, "top" affiche des "convert" qui sont <defunct> pendant une à
deux secondes.

- Pourquoi il n'a pas lancé 15000 "convert" d'un coup?
- Les <defunct> sont-ils des abandons ou des reports?

Voici une sortie de "top", ou il n'y a pas de <defunct>.



21:27:42 up 3 days,2:37, 12 users, load average: 42.63, 36.84, 19.42
Tasks: 192 total, 27 running, 158 sleeping, 0 stopped, 7 zombie
Cpu(s): 98.7%us, 1.2%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.2%hi, 0.0%si,
0.0%st
Mem: 2054384k total, 2010072k used, 44312k free, 58384k buffers
Swap: 1959848k total, 38472k used, 1921376k free, 944104k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ P COMMAND

8857 mihamina 19 0 61492 9808 6100 R 26 0.5 0:00.80 0 convert

8860 mihamina 19 0 61492 9812 6100 R 20 0.5 0:00.61 1 convert

8864 mihamina 18 0 61448 9760 6056 R 17 0.5 0:00.52 0 convert

8851 mihamina 18 0 61452 9764 6064 R 14 0.5 0:00.64 0 convert

8861 mihamina 18 0 61460 9832 6100 R 13 0.5 0:00.40 0 convert

8863 mihamina 18 0 61536 9844 6140 R 11 0.5 0:00.35 0 convert

8853 mihamina 18 0 61492 9808 6100 R 10 0.5 0:00.54 1 convert

8852 mihamina 25 0 61492 9808 6100 R 8 0.5 0:00.49 0 convert

8868 mihamina 18 0 61460 9832 6100 R 7 0.5 0:00.22 0 convert

8870 mihamina 25 0 61512 9828 6120 R 7 0.5 0:00.22 0 convert

6620 root 15 0 408m 77m 10m S 7 3.8 221:43.34 1 Xorg

8837 mihamina 25 0 61488 9800 6100 R 7 0.5 0:00.79 1 convert

8842 mihamina 25 0 61488 9804 6100 R 7 0.5 0:00.70 0 convert

8859 mihamina 25 0 61540 9852 6144 R 7 0.5 0:00.32 0 convert

8866 mihamina 18 0 61540 9848 6144 R 7 0.5 0:00.20 0 convert

8844 mihamina 18 0 61524 9832 6132 R 6 0.5 0:00.51 1 convert

8840 mihamina 18 0 61492 9804 6100 R 6 0.5 0:00.71 1 convert

2 réponses

Avatar
Luc.Habert.00__arjf
Tu dois avoir une limite au nombre de process.
Avatar
Nicolas George
Mihamina Rakotomandimby wrote in message
<fee135$2g1t$:
- Pourquoi il n'a pas lancé 15000 "convert" d'un coup?


Probablement parce que tu as atteint une limite quelconque de ton compte, en
nombre de processus peut-être. Regarde la sortie de limit ou ulimit -a.

- Les <defunct> sont-ils des abandons ou des reports?


http://fr.wikipedia.org/wiki/Processus_zombie

Comme le système doit râmer un peu, le père ne les tue pas instantanément.