Re: "ps -o %mem" and free memory in Linux

2020-10-02 Thread Fabrice BAUZAC-STEHLY
Victor Sudakov writes: > I summed up with awk the values of %mem, which are supposed to be "ratio > of the process's resident set size to the physical memory", correct? > > In my understanding, the value of %mem should indicate how much physical > memory is spent on the "individual" part of the

Re: "ps -o %mem" and free memory in Linux

2020-09-29 Thread Victor Sudakov
to...@tuxteam.de wrote: > > > Those are kind of virtual things, as far as I understand. If not %mem, then > > what `ps` parameter can show me how many php-fpm workers I can safely start > > before RAM is exhausted? > > This is a seemingly easy question with a surprisingly difficult answer. > > I

Re: "ps -o %mem" and free memory in Linux

2020-09-29 Thread Victor Sudakov
Klaus Singvogel wrote: > Victor Sudakov wrote: > > > Perhaps because the php-fpm workers were forked from the same parent > > > and so a lot of theie 'physical' RAM is actually the same RAM as each > > > other, because it's not been modified? > > > > I see your point, but ps(1) talks about real ph

Re: "ps -o %mem" and free memory in Linux

2020-09-29 Thread Klaus Singvogel
Victor Sudakov wrote: > > Perhaps because the php-fpm workers were forked from the same parent > > and so a lot of theie 'physical' RAM is actually the same RAM as each > > other, because it's not been modified? > > I see your point, but ps(1) talks about real physical RAM: > > %mem%MEM

Re: "ps -o %mem" and free memory in Linux

2020-09-29 Thread tomas
On Tue, Sep 29, 2020 at 10:19:17PM +0700, Victor Sudakov wrote: [...] > Those are kind of virtual things, as far as I understand. If not %mem, then > what `ps` parameter can show me how many php-fpm workers I can safely start > before RAM is exhausted? This is a seemingly easy question with a su

Re: "ps -o %mem" and free memory in Linux

2020-09-29 Thread Victor Sudakov
to...@tuxteam.de wrote: > On Tue, Sep 29, 2020 at 10:24:35AM +0700, Victor Sudakov wrote: > > Dear Colleagues, > > > > Could you please clarify for me how the following is possible. `ps` shows > > that the php-fpm workers have occupied 62% of physical memory, while > > `free` shows that only 1.3Gi

Re: "ps -o %mem" and free memory in Linux

2020-09-29 Thread Victor Sudakov
Tixy wrote: > > > > Could you please clarify for me how the following is possible. `ps` shows > > that the php-fpm workers have occupied 62% of physical memory, while > > `free` shows that only 1.3Gi (which is 17% of total RAM) is used: > > > > $ ps axww -o cmd,%mem |awk '/php-fpm/{sum+=$NF}END{p

Re: "ps -o %mem" and free memory in Linux

2020-09-29 Thread tomas
On Tue, Sep 29, 2020 at 10:24:35AM +0700, Victor Sudakov wrote: > Dear Colleagues, > > Could you please clarify for me how the following is possible. `ps` shows > that the php-fpm workers have occupied 62% of physical memory, while > `free` shows that only 1.3Gi (which is 17% of total RAM) is used

Re: "ps -o %mem" and free memory in Linux

2020-09-29 Thread Tixy
On Tue, 2020-09-29 at 10:24 +0700, Victor Sudakov wrote: > Dear Colleagues, > > Could you please clarify for me how the following is possible. `ps` shows > that the php-fpm workers have occupied 62% of physical memory, while > `free` shows that only 1.3Gi (which is 17% of total RAM) is used: > >

"ps -o %mem" and free memory in Linux

2020-09-28 Thread Victor Sudakov
Dear Colleagues, Could you please clarify for me how the following is possible. `ps` shows that the php-fpm workers have occupied 62% of physical memory, while `free` shows that only 1.3Gi (which is 17% of total RAM) is used: $ ps axww -o cmd,%mem |awk '/php-fpm/{sum+=$NF}END{print sum}' 62.1 $ f