Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Feb 2018 08:25:28 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Michael Voorhis <mvoorhis@mcvau.net>, freebsd-stable@freebsd.org
Subject:   Re: 50 percent swap used, but "ps auxww" output shows no processes swapped out
Message-ID:  <5A766108.7040502@grosbein.net>
In-Reply-To: <798bb18f-cdd6-f30a-5f21-832032a15d52@mcvau.net>
References:  <b4f2f623-4d58-a783-4c6b-5138c6dfcf52@mcvau.net> <5A763C48.5020907@grosbein.net> <798bb18f-cdd6-f30a-5f21-832032a15d52@mcvau.net>

next in thread | previous in thread | raw e-mail | index | archive | help
04.02.2018 6:42, Michael Voorhis wrote:
 
> 1 frame of your requested "top" output, sorted as specified:
> 
>> last pid: 47195;  load averages:  0.17,  0.37,  0.44 up 99+20:40:41  18:37:07
>> 369 processes: 1 running, 368 sleeping
>> CPU:  0.2% user,  0.0% nice,  0.2% system,  0.0% interrupt, 99.7% idle
>> Mem: 6989M Active, 79G Inact, 27G Laundry, 10G Wired, 1568M Buf, 1680M Free
>> Swap: 21G Total, 11G Used, 10G Free, 50% Inuse
>>
>>   PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
>> 61839 pgsql         1  21    0 32665M 31349M select 13   3:13   0.00% postgres
>> 59354 pgsql         1  20    0 32659M 26625M select 12 288:57   0.00% postgres
>> 40354 pgsql         1  20    0 32660M 26182M select 12 220:15   0.00% postgres
>> 24708 pgsql         1  20    0 32659M 26144M select  3 204:14   0.00% postgres
>> 37664 pgsql         1  20    0 32649M 25967M select 12  48:55   0.00% postgres
>> 56094 pgsql         1  25    0 32659M 25734M select  5 189:00   0.00% postgres
>> 57255 pgsql         1  20    0 32661M 25414M select  6 143:53   0.00% postgres
>> 38662 pgsql         1  20    0 32659M 23669M select  1 229:03   0.00% postgres
>> 48035 pgsql         1  20    0 32663M 22195M select  3 149:13   0.00% postgres
>> 66831 pgsql         1  20    0 32659M 21944M select  2  61:00   0.13% postgres
>> 45832 pgsql         1  20    0 32659M 21427M select  4 158:26   0.00% postgres
>> 56976 pgsql         1  20    0 32661M 14110M select  1  56:26   0.00% postgres
>> 26207 pgsql         1  20    0 32659M 11620M select  8  34:21   0.00% postgres
>>   383 www          64  20    0 34010M  8860M nanslp 14  11:26   0.11% jsvc
>> 44067 pgsql         1  20    0 32659M  6194M select 11  15:16   0.00% postgres
>> 31431 pgsql         1  20    0 32661M  4928M select 15  15:41   0.00% postgres
>> 34641 pgsql         1  20    0 32650M  2383M select 14   2:04   0.00% postgres> [...]

Well, you have tens of processes each allocating about 32G of memory.
Some part of that memory may be shared but some is not not.

No wonder there are tens gigabytes of private pages shown processes have
and some of that pages were paged out to swap area in moments
when kernel was short of free pages (note small "Free" number).

Later when some memory was freed, those pages were NOT get back from the swap
because there were no demand for their contents. That's pretty normal.

For example, PIDs 56976 or 26207 or 26207 all allocated over 30G
and may be touched over 20G (let's assume that) but their RESident size
is considerably less, so rest was paged out to swap.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A766108.7040502>