You wrote:
| F UID PID PPID PRI NI SIZE RSS WCHAN STAT TTY TIME CMD
| 0 0 81 44 1 0 139 672 12db2f S ? 0:02 nmbd
| 0 0 97 44 1 0 389 1160 12db2f S ? 0:01 smbd
|
| Does the value in the RSS column indicate that every client
| connected to the samba server needs about 1 MB of RAM? And if so,
| would a server with 16MB RAM and 20 clients swap a lot (maybe so much
| that the clients lose the connection)?
No, especially if it's Solaris (;-))
All Unixes try to keep just one copy of the executable
code in memory, and only need to allocate real memory for
data when you start an additional copy of the program.
Machines with shared libraries do even better: while many
programs may use a library, only one copy of it's code
is present.
This makes RSS a very bad estimator: it's more like the
**worst possible case**. I use RSS-(size of program +
size of all shared libs used) as my estimator for the second
and subsequent copies.
--dave
--
David Collier-Brown, | Cherish your enemies. They're harder to
185 Ellerslie Ave., | come by than friends and more motivated.
Willowdale, Ontario | davecb@canada.sun.com, hobbes.ss.org
N2M 1Y3. 416-223-8968 | http://java.science.yorku.ca/~davecb