RES/RSS on Solaris vs Linux

Posted by Gareth Vincent on 29-Jul-2015 00:49

I'm trying to understand the difference when measuring RSS/RES between Solaris and Linux

When spawning a server on Solaris the RSS is reporting 1.2GB of memory usage

Broker Name : freeway_motors_nfs
Operating Mode : Stateless
Broker Status : ACTIVE
Broker Port : 51009
Broker PID : 19010
Active Servers : 1
Busy Servers : 0
Locked Servers : 0
Available Servers : 1
Active Clients (now, peak) : (5, 5)
Client Queue Depth (cur, max) : (0, 1)
Total Requests : 273
Rq Wait (max, avg) : (520 ms, 2 ms)
Rq Duration (max, avg) : (16710 ms, 420 ms)

PID State Port nRq nRcvd nSent Started Last Change
19026 AVAILABLE 02623 000273 000462 006393 Jul 29, 2015 04:55 Jul 29, 2015 07:31

PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
19026 root 1447M 1260M sleep 55 0 0:01:31 0.1% _proapsv/1

When running the same application on Centos the RES memory reports only 54m

Broker Name : rslive_p
Operating Mode : Stateless
Broker Status : ACTIVE
Broker Port : 14901
Broker PID : 5914
Active Servers : 2
Busy Servers : 0
Locked Servers : 0
Available Servers : 2
Active Clients (now, peak) : (0, 0)
Client Queue Depth (cur, max) : (0, 0)
Total Requests : 0
Rq Wait (max, avg) : (0 ms, 0 ms)
Rq Duration (max, avg) : (0 ms, 0 ms)

PID State Port nRq nRcvd nSent Started Last Change
05937 AVAILABLE 14911 000000 000000 000000 Jul 24, 2015 16:01 Jul 24, 2015 16:01

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5937 root 20 0 1059m 54m 26m S 0.0 2.9 0:01.17 _proapsv

I would appreciate if anyone can share some light on this as there seems to be quite an extreme difference between the two platforms.  I'm hoping that i'm reading this incorrectly and that there is a better measurement that can be used to compare the two platforms.

Posted by Roy Ellis on 30-Jul-2015 10:37

Hi Gareth,

Are you connecting to a database via shared memory?

If so the RSS on Solaris is showing you not just the memory for the client (be it AppServer or 4GL character) but also for the shared memory of the database.  So this is _NOT_ an accurate value of actual memory size.

To get a better idea of the memory the client only is using, start the AppServer with no database connections (and even then I don’t completely trust RSS on Solaris).

Let me know what you find,

Roy

Posted by TheMadDBA on 30-Jul-2015 10:47

Roy is on the right track here. The definition of RSS varies greatly from OS to OS.

Run pmap to show which memory segments are shared memory for a process.

pmap -x <pid>

The Solaris output should show a segment with the s flag that is roughly equivalent to your -B setting.

All Replies

Posted by Roy Ellis on 30-Jul-2015 10:37

Hi Gareth,

Are you connecting to a database via shared memory?

If so the RSS on Solaris is showing you not just the memory for the client (be it AppServer or 4GL character) but also for the shared memory of the database.  So this is _NOT_ an accurate value of actual memory size.

To get a better idea of the memory the client only is using, start the AppServer with no database connections (and even then I don’t completely trust RSS on Solaris).

Let me know what you find,

Roy

Posted by TheMadDBA on 30-Jul-2015 10:47

Roy is on the right track here. The definition of RSS varies greatly from OS to OS.

Run pmap to show which memory segments are shared memory for a process.

pmap -x <pid>

The Solaris output should show a segment with the s flag that is roughly equivalent to your -B setting.

Posted by Gareth Vincent on 30-Jul-2015 11:04

Thanks Roy for clearing this up for me.  That is exactly where the memory is coming from.  Applying the pmap command as TheMadDBA suggested, gives me a better understanding as to where the memory is allocated.

This thread is closed