1753907 Members
9106 Online
108810 Solutions
New Discussion юеВ

swapinfo

 
dattu_1
Regular Advisor

swapinfo

hi guys,
i have a setup of 2 nodes in cluster..rx4640 with 8 GB RAM and 2 cpu,s...
Also currently i have 4 databases running which r going to increase to atleast 8 ...will only increasing swap help me or i will have to buy some RAM...i.e.32 or 64 GB..

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16000 1580 14420 10% 0 - 1 /dev/vg00/lvol2
reserve - 3453 -3453
total 16000 5033 10967 85% - 0 -
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: swapinfo

Shalom,

When faced with a choice of buying RAM or increasing swap, buy the RAM.

Increasing swap will on the short term deal with issues of your databases requesting memory and not getting it.

It will also slow down the system because disk is slower than RAM.

If you really want to improve performance, buy RAM.

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: swapinfo

Hi:

You definitely need more memory. You appear to already be swapping and therefore performance is already suffering. Without doing anything, if you add more processes (databases) you are likely to see fork() and errno 12 (not enough memory) failues when processes can't reserve swap space during their creation. Adding swap space would help eliminate this but isn't the best answer.

You might want to look at your 'po' (page-out) values from 'vmstat'. Anything higher than ~10 is an indication of serious swapping.

You don't offer any details about the databases (transaction oriented or data warehouse) nor the database engines (Oracle?).

In addition to adding memory, turn on 'swapmem_on=1' to enable pseudoswap. This keeps 75% of physical memory from requiring swap reservation space for its processes and allows more processes to be started with less swap space. When you enable pseudoswap you will see an additional line marked "memory" in the output of 'swapinfo -ta'.

I'd also make sure that your dynamic buffer cache isn't set too high --- no more than 5-8% perhaps for 'dbc_max_pct'. You may already be consuming more memory for the Unix buffer cache than is necessary.

Regards!

...JRF...
Court Campbell
Honored Contributor

Re: swapinfo

I too an always from more ram. But you may also want to look at what you have set for the kernel params dbc_max_pct and dbc_min_pct. The default for dbc_max_pct is 50. depending on your OS you could use the following to see the values:

11.0 & 11.11
# kmtune | grep dbc

11.23
# kctune | grep dbc

You could set your min % to 2 and your max % to 5. I hope that helps. But if your company will buy it, more ram never hurts.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"