Re: Resident memory reported by Top
John Haxby <[email protected]> Tue, 25 Nov 2008 10:06:38 +0000
| Newsgroups | gmane.linux.redhat.release.taroon.general |
|---|---|
| Message-ID | <[email protected]> |
Caughey, Michael (CONT) wrote: > > This question borders on MySQL Administration but it is also really > more a Linux administration question. When running top on RedHat, > what is the value for RSS that is reported in the Process for mysqld? > I know its made up of data and code, but is this the code/data for a > particular connection, thread of execution or the entire application? > It's the entire application. All the threads in an application share the same virtual memory and, of course, the same virtual memory statistics. > > So what I'm really looking for is how is the value determined so that > I know what affects it, thus we can determine if it is acceptable, and > determine a threshold for monitoring. > A "threshold for monitoring"? The resident set size is the amount of virtual memory that's resident in physical memory for an application. If it's below the working set size for the application then you'll get some paging I/O (the working set being the pages that an application touches in a specified interval). If the working set size is below the resident set size (as is the normal case) then there are pages that can be reclaimed for a different application. You probably want to be watching for other things -- swap usage, paging traffic (but bear in mind that paging happens a lot normally) and, of course, I/O traffic. If an applications resident set size is less than its working set size (for a suitably short interval) then you're in deep trouble because you'll have a _lot_ of disk traffic for swapping in and out and the application and the machine will run very very slowly. But monitoring the RSS won't tell you that's happened -- especially as the sum of all the RSS's is greater than physical memory because of sharing. jch -- Taroon-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/taroon-list