Operating System - HP-UX
1752806 Members
6106 Online
108789 Solutions
New Discussion юеВ

Re: How memory can be allocated to users ?

 
SOLVED
Go to solution
Jerry_109
Super Advisor

How memory can be allocated to users ?

# uname -a ; model
HP-UX B.11.31 U ia64 hp server Integrity Virtual Machine
####################
Memory Information:
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 8383248 Kbytes, lockable: 6683416 Kbytes, available: 6875484 Kbytes
####################
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/swap
dev 25024 0 25024 0% 0 - 0 /dev/vg00ext/swap2
reserve - 3080 -3080
memory 7788 4850 2938 62%
total 41004 7930 33074 19% - 0 -
####################
Question:
How much memory can we devote to users?

Hi,

I am trying to understand how much memory we can safety allocate to users. I suspect that all user processes should occupy less than

Physical Memory - "Sys Mem"

Is "Sys Mem" is reserved for use by the OS, is that correct? I realise that we can allocate more than this amount, and that we can spill out to vitual memory, but if our "active memory" exceeds this figure we are likely to degrade performance by causing page outs?

So, for example on our server, we have 8G of physical memory with 3.9 "Sys Mem", so we should aim to fit the user processes inside 8gb - 3.9gb = 4.19gb?

Does this make sense?

##################
Glance memory info :
total vm=3.2gb
Active vm=1.2gb
phys mem=8gb
sys mem=3.9gb
user mem=2.7gb
free mem=1.1gb
7 REPLIES 7
Dennis Handly
Acclaimed Contributor
Solution

Re: How memory can be allocated to users ?

You have 41 Gb of VM and 8 Gb of RAM. It seems you have "too" much swap.

>I suspect that all user processes should occupy less than: Physical Memory - Sys Mem

Something like that. Unless you want to swap. Or your processes allocate lots of VM but don't use it all. Or you use it infrequently.

>Is "Sys Mem" is reserved for use by the OS?

Yes, this is the current value.
Steven E. Protter
Exalted Contributor

Re: How memory can be allocated to users ?

Shalom,

The old rule of swap being twice ram is outdated in this range of system.

Swap being five times ram is outlandish.

It will slow your system down.

Remove or reduce swap to between 8 GB and 12 GB.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: How memory can be allocated to users ?

Hi:

> SEP: It will slow your system down.

How? No, if you don't use it then there's no penalty. Nascent processes will reserve swap but that's kernel bookkeeping and not I/O until a page-out actually occurs. Having over-configured device swap might mean you wasted some disk space that could be used for something else, but that's about all.

Regards!

...JRF...


Jerry_109
Super Advisor

Re: How memory can be allocated to users ?

Thanks you all.
Bill Hassell
Honored Contributor

Re: How memory can be allocated to users ?

I wouldn't worry much about trying to figure out memory allocation. It is simply too complicated. A user doesn't occupy memory -- the user's programs use some memory. But it isn't that simple. Every running program such as vi or glance or a shell shares a single copy of the text area or unchanging instructions. An additional space for local data is kept separate for each copy. Then to make things complicated, each user program that reads/writes files will use a portion of the kernel's buffer cache. And some specialized programs like fbackup or database programs create shared memory areas.

There is no penalty for using a lot of virtual memory when programs are highly interactive because they can be moved into swap and brought back when the user wakes up. The best metric (rather than memory usage) is to monitor page outs, either Glance (memory display) or vmstat. Low numbers mean high performance. 0-99 (2 digits) is OK, hundreds or larger means degraded performance.


Bill Hassell, sysadmin
Emil Velez
Honored Contributor

Re: How memory can be allocated to users ?

Lets look at a few things

Total physical memory 8 GB

Free Memory 1.1 Gb

Swap space used (device swap) 0

You have plenty of memory. Part of your system memory is probably buffer cache (unified file cache).

You have 1.1 GB of free memory.. Be happy. If you were low on memory you would be doing page outs and the amount of free memory would always be very small.

Look at what is running and see what your system is spending most of its time doing.

Whats your CPU utilization and load average look like. Since you evidently have enough memory.

Jerry_109
Super Advisor

Re: How memory can be allocated to users ?

cpu is fine. I was just curious about certain questions related to memory. Things I thought I was clear about, the more I viewed the subject of memory, the more I realized how little I knew. I need to read more.

Thanks you all.