Re: help with huge memory consumption??

On Wed, 14 Mar 2007 17:12:57 +0000 (UTC) Michel Talon <talon@xxxxxxxxxxxxxxxx> wrote:

| phil-news-nospam@xxxxxxxx wrote:
|> Though certainly different in the way they must be handled, threads and
|> processes are still very much analoguous facilities that can both be
|> considered at early design phase of a project (though in most, one or
|> the other will quickly be seen as too costly or too risky and decisions
|> get made very early).
| This is not relevant for linux, which uses 1-1 threads, and is no more
| relevant for FreeBSD who is moving to 1-1 threads, but commercial
| operating systems have succeeded in making good use of N:M threads
| (i have been told that IBM AIX has a good implementation) and in this
| case there is certainly a huge performance difference if you can use
| threads by the thousands and schedule only a small number of them in
| kernel. A typical example of design difference, threads versus
| processes, is given by the well known databases postgres and mysql, the
| first one uses shared memory and semaphores to share between processes,
| while the second one uses threads. How do they behave under extreme (*)
| load, i don't know. Usually people complain about mutex contention with
| threaded design, but i have been told that semaphore problems also
| abound in the process design, notably one has to cope with waking up a
| lot of processes on semaphore operations. Also by nature, these system V
| IPC objects are persistent, so crashing programs will pollute the system
| tables and require use of ipcrm to clean up. On the other hand crashing
| programs will not crash the whole set of programs as is so nicely
| exemplified by some firefox thread crashing.
| (*) apparently quite similarly, but i don't want to enter discussions.

I still don't see how this says that one cannot compare threads and processes.
I'm still comparing them. Obviously the conclusion of the comparison is that
there are differences, and few applications could hope to just work the same
on either. But still, that doesn't eliminate comparing.

| Phil Howard KA9WGN ( / Do not send to the address below |
| first name lower case at / spamtrap-2007-03-14-1402@xxxxxxxx |