Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #227484
| From | Victor Sudakov <vas@sibptus.ru> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: "ps -o %mem" and free memory in Linux |
| Date | 2020-09-29 17:20 +0200 |
| Message-ID | <AUpA5-4Nh-3@gated-at.bofh.it> (permalink) |
| References | <AUeuZ-6ze-1@gated-at.bofh.it> <AUi5A-jZ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
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{print sum}'
> > 62.1
> > $ free -h
> > total used free shared buff/cache available
> > Mem: 7.5Gi 1.3Gi 4.4Gi 113Mi 1.8Gi
> > 5.8Gi
> > Swap: 0B 0B 0B
> > $
>
> 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 ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage. (alias pmem).
If those php-fpm workers share a lot of virtual (?) memory between one
another, shouldn't `ps` show it as such?
--
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
"ps -o %mem" and free memory in Linux Victor Sudakov <vas@sibptus.ru> - 2020-09-29 05:30 +0200
Re: "ps -o %mem" and free memory in Linux Tixy <tixy@yxit.co.uk> - 2020-09-29 09:20 +0200
Re: "ps -o %mem" and free memory in Linux Victor Sudakov <vas@sibptus.ru> - 2020-09-29 17:20 +0200
Re: "ps -o %mem" and free memory in Linux Klaus Singvogel <deb-user-ml@singvogel.net> - 2020-09-29 17:40 +0200
Re: "ps -o %mem" and free memory in Linux Victor Sudakov <vas@sibptus.ru> - 2020-09-29 18:00 +0200
Re: "ps -o %mem" and free memory in Linux Fabrice BAUZAC-STEHLY <noon@mykolab.com> - 2020-10-02 21:50 +0200
Re: "ps -o %mem" and free memory in Linux <tomas@tuxteam.de> - 2020-09-29 11:20 +0200
Re: "ps -o %mem" and free memory in Linux Victor Sudakov <vas@sibptus.ru> - 2020-09-29 17:20 +0200
Re: "ps -o %mem" and free memory in Linux <tomas@tuxteam.de> - 2020-09-29 17:30 +0200
Re: "ps -o %mem" and free memory in Linux Victor Sudakov <vas@sibptus.ru> - 2020-09-29 18:00 +0200
csiph-web