Re: postgresql + apache under heavy load

Поиск
Список
Период
Сортировка
От Alex Madon
Тема Re: postgresql + apache under heavy load
Дата
Msg-id 400ED59E.4010105@bestlinuxjobs.com
обсуждение исходный текст
Ответ на Re: postgresql + apache under heavy load  (Richard Huxton <dev@archonet.com>)
Ответы Re: postgresql + apache under heavy load  (Richard Huxton <dev@archonet.com>)
Re: postgresql + apache under heavy load  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-general
Hello Richard,
Thank you for your answer.
Richard Huxton wrote:

>Are you saying you had more than 8 connections open simultaneously?
>
Well, I don't know how to find that out.
What I did is issuing several tomes a ps aux and I never saw more than
6-7 postmaster SELECT.

>Are you
>sure you restarted PG so that it noticed the new values? You can check config
>settings with "show all;" from psql, or "show <setting>".
>
Yes I restart it. The show command outputs the correct value (8).

>
>You'll want to use the "top" command to show the amount of memory each process
>

A typical output (in a concurrency of 20, no cache) is:
 ps aux | grep postgres
postgres  2332  0.0  0.0  8804  328 ?        R    18:54   0:01
/usr/bin/postmaster -p 5432 -d2
postgres  2334  0.0  0.0  9792   68 ?        S    18:54   0:00 postgres:
stats buffer process
postgres  2335  0.0  0.0  8828  200 ?        S    18:54   0:00 postgres:
stats collector process
postgres  4386  0.0  0.2  4312  956 pts/3    S    19:22   0:00 -bash
postgres  4871  0.0  0.5  9480 2304 ?        S    20:36   0:00 postgres:
user db [local] SELECT
postgres  4873  0.0  0.2  8816 1032 ?        R    20:36   0:00 postgres:
user db [local] startup
myuser    4877  0.0  0.1  3572  624 pts/4    S    20:36   0:00 grep postgres
postgres  4878  0.0  0.5  9220 2228 ?        R    20:36   0:00 postgres:
user db [local] SELECT
postgres  4879  0.0  0.5  9204 2016 ?        R    20:36   0:00 postgres:
user db [local] SELECT
---------------------------top-----------------------------
114 processes: 99 sleeping, 12 running, 3 zombie, 0 stopped
CPU states:  91.8% user   8.1% system   0.0% nice   0.0% iowait   0.0% idle
Mem:   384580k av,  316328k used,   68252k free,       0k shrd,   25424k
buff
                    253976k actv,   36916k in_d,    4704k in_c
Swap:  265064k av,   64788k used,  200276k free                   71132k
cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
 4914 apache    16   0  9016 8416  2552 S     6.7  2.1   0:00   0 httpd
 4832 apache    16   0  9016 8416  2552 S     6.3  2.1   0:01   0 httpd
 4915 apache    16   0  9016 8416  2552 S     5.9  2.1   0:00   0 httpd
 4917 apache    16   0  9016 8416  2552 S     5.9  2.1   0:00   0 httpd
 4919 apache    16   0  9020 8420  2536 S     5.9  2.1   0:00   0 httpd
 4774 apache    16   0  9016 8416  2552 S     5.7  2.1   0:02   0 httpd
 4896 apache    16   0  9060 8460  2568 S     5.7  2.1   0:00   0 httpd
 4908 apache    15   0  9016 8416  2552 S     5.7  2.1   0:00   0 httpd
 4909 apache    16   0  9016 8416  2552 S     5.7  2.1   0:00   0 httpd
 4658 apache    16   0  9136 8536  2568 S     5.5  2.2   0:04   0 httpd
 4921 apache    16   0  9016 8416  2552 S     5.5  2.1   0:00   0 httpd
 2581 root      16   0 14492 4544  1252 R     5.3  1.1   2:26   0 X
 4795 apache    16   0  9104 8504  2568 S     5.3  2.2   0:02   0 httpd
 4796 apache    16   0  9080 8480  2568 S     5.3  2.2   0:01   0 httpd
 4782 apache    16   0  8924 8324  2568 R     3.5  2.1   0:02   0 httpd
 2612 madona    15   0  4524 4136  2380 S     1.5  1.0   0:18   0 metacity
 4656 apache    15   0  9084 8484  2568 S     1.3  2.2   0:03   0 httpd
 4950 postgres  25   0     0    0     0 Z     1.1  0.0   0:00   0
postmaster <defunct>
 3812 madona    15   0 44728  42M 17460 S     0.7 11.2   3:21   0
mozilla-bin
 4947 postgres  25   0  2540 2392  1688 S     0.7  0.6   0:00   0 postmaster
 4952 postgres  25   0  2812 2664  1872 R     0.7  0.6   0:00   0 postmaster
 4610 madona    15   0  7460 7460  2152 R     0.5  1.9   0:00   0 xterm
 4904 madona    15   0  1108 1108   856 R     0.3  0.2   0:00   0 top
 4954 postgres  24   0  1916 1768  1244 R     0.1  0.4   0:00   0 postmaster
 4959 postgres  25   0  1596 1448   940 S     0.1  0.3   0:00   0 postmaster
 4961 postgres  25   0   984  824   640 R     0.1  0.2   0:00   0 postmaster
    1 root      15   0    88   60    40 S     0.0  0.0   0:04   0 init



Thanks
Alex



В списке pgsql-general по дате отправления:

Предыдущее
От: Alex Madon
Дата:
Сообщение: Re: postgresql + apache under heavy load
Следующее
От: Alex Madon
Дата:
Сообщение: Re: postgresql + apache under heavy load