Title: | DECthreads Conference |
Moderator: | PTHRED::MARYS TE ON |
Created: | Mon May 14 1990 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1553 |
Total number of notes: | 9541 |
I recently did some testing of a multi-threaded Java application on an SMP machine and noticed (to me) some odd behavior. (This was with our 1.1 JDK netkit which uses native threads.) While running on a 4-way machine, the application takes up 4 times as much memory (according to ps -l) as when running on a single processor. I would expect a small increase in memory usage due to the extra thread structures and the extra context switches, but not a 4-fold increase. It almost seems like the multi-threading is causing a duplication of the process, like what a fork call would do. Can someone explain to me why this is happening? Thanks. [Posted by WWW Notes gateway]
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1542.1 | Several possible explanations; here's one. | WTFN::SCALES | Despair is appropriate and inevitable. | Fri May 09 1997 22:26 | 13 |
.0> running on a 4-way machine, the application takes up 4 times as much .0> memory (according to ps -l) as when running on a single processor How much memory do you mean? Could you post the two 'ps' outputs? One possible explanation is that with four processors, you have four times as much going on (simultaneously), and therefore you need four times as much memory. That is, on a one processor machine, you might be doing your tasks serially (for the most part), and reusing the memory each time (so the total amount allocated never grows). Webb |