Many many processes with LINUX
We recently moved a java app and some MQ clients and servers to linux/390 for testing. Folks here are used to Solaris and are confused by the number of processes that show up when you issue 'ps -ef'. Many more than they are used to. If you ask Jeeves, there is info on the threading model linux uses. Linux apparently doesn't have 'lightweight' processes. Every thread is a process? I looked for an option on 'ps' to try to make the display look more like Solaris but didn't see one. Does anyone know of a good source of documentation on linux threading and processes?
Re: Many many processes with LINUX
On Tue, 2003-07-29 at 15:37, Ann Smith wrote: We recently moved a java app and some MQ clients and servers to linux/390 for testing. Folks here are used to Solaris and are confused by the number of processes that show up when you issue 'ps -ef'. Many more than they are used to. If you ask Jeeves, there is info on the threading model linux uses. Linux apparently doesn't have 'lightweight' processes. Every thread is a process? I looked for an option on 'ps' to try to make the display look more like Solaris but didn't see one. Does anyone know of a good source of documentation on linux threading and processes? ps will definitely show each thread. Threads are lighter weight than normal processes but still shown as processes by ps; there's some reason in the kernel that this is the case. I don't remember enough about this to be more helpful, though, and I don't know if there's a way to make ps be more selective. Adam
Re: Many many processes with LINUX
New threads and processes are both created via a call to clone(). The former uses flags that tell clone not to duplicate everything (like virtual memory). The new thread or process gets a unique PID. In the 2.6 there'll be something called a process group ID and a new threading model known as NPTL. All threads created by a process will belong to such a group. The display of processes can then be restricted to much less numbers of beasts. (Mind you the practice of creating hundreds or even thousands of threads by many (typical?) Java apps. is pretty braindead. The use of a few threads with work queues seems (to me) to be a better practice.) -Original Message- On Tue, 2003-07-29 at 15:37, Ann Smith wrote: We recently moved a java app and some MQ clients and servers to linux/390 for testing. Folks here are used to Solaris and are confused by the number of processes that show up when you issue 'ps -ef'. Many more than they are used to. If you ask Jeeves, there is info on the threading model linux uses. Linux apparently doesn't have 'lightweight' processes. Every thread is a process? I looked for an option on 'ps' to try to make the display look more like Solaris but didn't see one. Does anyone know of a good source of documentation on linux threading and processes? ps will definitely show each thread. Threads are lighter weight than normal processes but still shown as processes by ps; there's some reason in the kernel that this is the case. I don't remember enough about this to be more helpful, though, and I don't know if there's a way to make ps be more selective.
Re: Many many processes with LINUX
I think that the reason that the threads don't show up in ps on Solaris that 'lightweight' processes are implemented in the library at user level. The kernel does not know about them. This was the case a one time anyway. This disadvantage of this is that if any thread goes compute bound for a long time no other thread can run. I suspect that this is what causes some of the performance problems I hear about with Apache under Solaris. I have a book called Inside Linux, or something like that. It has a section on process scheduling. If you want I can give you the ISBN. The book is at home, so I can't see it right now. -Original Message- From: Ann Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 1:37 PM To: [EMAIL PROTECTED] Subject: Many many processes with LINUX We recently moved a java app and some MQ clients and servers to linux/390 for testing. Folks here are used to Solaris and are confused by the number of processes that show up when you issue 'ps -ef'. Many more than they are used to. If you ask Jeeves, there is info on the threading model linux uses. Linux apparently doesn't have 'lightweight' processes. Every thread is a process? I looked for an option on 'ps' to try to make the display look more like Solaris but didn't see one. Does anyone know of a good source of documentation on linux threading and processes?
Re: Many many processes with LINUX
On Maw, 2003-07-29 at 22:16, Fargusson.Alan wrote: I think that the reason that the threads don't show up in ps on Solaris that 'lightweight' processes are implemented in the library at user level. The kernel does not know about them. This was the case a one time anyway. Modern solaris certainly does LWP in kernel space.
Re: Many many processes with LINUX
On Tue, 29 Jul 2003, Ferguson, Neale wrote: New threads and processes are both created via a call to clone(). The former uses flags that tell clone not to duplicate everything (like virtual memory). The new thread or process gets a unique PID. In the 2.6 there'll be something called a process group ID and a new threading model known as NPTL. All threads created by a process will belong to such a group. The display of processes can then be restricted to much less numbers of beasts. (Mind you the practice of creating hundreds or even thousands of threads by many (typical?) Java apps. is pretty braindead. The use of a few threads with work queues seems (to me) to be a better practice.) NPTL is in Red Hat Linux 9 and later. You can try it right now (and probably should) by participating in Red Hat's current beta of its ES line of software for xBoxes pBoxes iBoxes and importantly, zBoxes. For the zBox, your choice - 32-bit or 64. -- Cheers John. Join the Linux Support by Small Businesses list at http://mail.computerdatasafe.com.au/mailman/listinfo/lssb Copyright John Summerfield. Reproduction prohibited.