Обсуждение: Process

Поиск
Список
Период
Сортировка

Process

От
"Alexander B."
Дата:
Hi,

I have a Postgres server that has more than 500MB ( shared_buffers =
64000) and looking at TOP command, I couldn't understand why appears
some process with 536m and other with 23m.
What's the difference between?

Wouldn't be all process with 536m, including client connections, but not
allocating all this memory, just server process?

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4039 postgres  16   0  537m  13m 536m S  0.0  0.7   0:01.53 postmaster
 4040 postgres  16   0 25572 3356  23m S  0.0  0.2   0:00.14 postmaster
 4042 postgres  15   0  537m 400m 536m S  0.0 20.0   0:01.63 postmaster
 4043 postgres  16   0 25568 3424  23m S  0.0  0.2   0:00.01 postmaster
 4044 postgres  16   0 26572 4396  23m S  0.0  0.2   0:01.85 postmaster
 4045 postgres  15   0 25848 3584  23m S  0.0  0.2   0:00.96 postmaster


Thanks in advance for you help.


Re: Process

От
Tom Lane
Дата:
"Alexander B." <burbello3000@yahoo.com.br> writes:
> I have a Postgres server that has more than 500MB ( shared_buffers =
> 64000) and looking at TOP command, I couldn't understand why appears
> some process with 536m and other with 23m.
> What's the difference between?

Some versions of top only count the pages of shared memory that a
given process has actually touched so far.  So for example in the
shared buffer arena, the reported usage will rise as the process runs
longer and chances to use buffers other than the ones it's used already.
It's pretty misleading, because it makes normal behavior look like a
memory leak :-(

            regards, tom lane