Re: Re[2]: Memory requirements for web-project

Поиск
Список
Период
Сортировка
От Lincoln Yeoh
Тема Re: Re[2]: Memory requirements for web-project
Дата
Msg-id 3.0.5.32.20010205102529.00a5f8e0@192.228.128.13
обсуждение исходный текст
Ответ на Re[2]: Memory requirements for web-project  (Boris <koester@x-itec.de>)
Список pgsql-general
At 06:13 PM 04-02-2001 +0100, Boris wrote:
>LY> My guess is that your hits are likely to bunch up at certain times,
rather
>LY> than be spread out evenly (90% of the people behave similarly 90% of the
>LY> time). So you might wish to multiply by 5 or 10 (or whatever you pluck
from
>LY> the air ;) ) to cater for peak load.
>
>Ah, very interesting, yes - I forgot!

The peak vs the average ratio depends on the sort of application. It may
not vary that much for corporate data entry stuff.

>LY> Why are you saying it takes 3 seconds for a client? If it's because the
>
>No its a server problem, has nothing to do with the database -)

That's interesting. Any reason why 3 secs, which you can tell us?

>That sounds good, the only question left is the memory requiremend of
>apache per client, i do not completely understand the spawning things
>with Apache. On high load there are alway minimum 10 processes left,
>but where is the limit? Interesting thing.

Are you running apache and your web application on the same server as your
postgresql server? This would mean the total mem taken would probably be
apache+webapp+postgresql x max concurrent connections.

Apache 1.x starts up a number of processes to handle requests. Check out
what is said in httpd.conf about MinSpareServers and MaxSpareServers.

The max limit is controlled by MaxClients in httpd.conf

If it's a dedicated server for performance reasons you could have your
MaxSpareServers and StartServers reasonably high, that way Apache doesn't
have to keep killing and restarting new processes. Your MaxClients should
be kept to a value X where X concurrent connections won't cause your server
to swap.

e.g. example for peak if everything running on one server
Assuming 512MB RAM
apache=3MB with 2MB shared = 1MB per additional connection.
webapp=5MB with 2MB shared = 3MB per additional connection.
postgresql=6MB with 4MB shared (peak) = 2MB per additional connection.

Total = 6MB per additional connection.

So with MaxClients 60, you're limited to 60 http connections = 360MB,
leaving you 150MB to run various stuff, cope with strangeness, cache your
DB etc and let you sleep soundly at night.

512MB is ok for a DB only server doing your proposed load, but may be a bit
of a squeeze if you chuck your webserver and apps on it as well.

Cheerio,
Link.


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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Installing Postgresql 7 on either RaQ3i or RaQ2
Следующее
От: Francisco Reyes
Дата:
Сообщение: Re: Re[2]: Memory requirements for web-project