1833759 Members
2419 Online
110063 Solutions
New Discussion

RAM & Swap

 
Massimo_37
Frequent Advisor

RAM & Swap

The Oracle Installation guide advises that there should be 3 times the RAM on Swap. I have attached(pl see attachment) output from dmesg (HP UX 10.2) .
It looks like i have RAM 524,280 K=536,862,720 bytes.
While Swap is 1048576 * 512=536,870,912 bytes.
So, this means that I have to increase the swap to atleast 1.5 G now ? Am I right ? When doing that should i allocate 3G to swap/dump logical volume , so that half of it will be allocated to Swap. Mnay thanks in advance
15 REPLIES 15
KapilRaj
Honored Contributor

Re: RAM & Swap

As you just have 512 MB of RAM , It is a good idea to have more swap (3 times ? not a bad idea).. But if ur system is really swapping you will hit some performance problems.

If you primary swap is 1 GB I would recommend creating another 1 GB swap on a high speed disk .

Regds,

Kaps
Nothing is impossible
Geoff Wild
Honored Contributor

Re: RAM & Swap

Yes - you will need a lot of swap.

I would highley recommend that you buy more ram....

On my SAP/Oracle systems I have 24 - 28 GB of swap and 10GB of ram. So 3 times is not unheard of.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: RAM & Swap

For good oracle operation, you will probably need to increase swap to at least 1.5 GB.

More likely 2.0 G.B.

Oracle will be sluggish in any event. This system simply does not have enough memory to run oracle and the OS efficiently.

For good operation, find a different server or upgrade this ones memory.

Also note that 10.20 is not supported and if you have problems getting support will be difficult.

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
Ted Buis
Honored Contributor

Re: RAM & Swap

If you increase swap space, make sure that the kernel will use it. Since your are running HP-UX 10.20, you might have a low value for maxswapchunks. Look at the output for sysdef to see the value of swchunk. Don't alter the swchunk value, only maxswapchunks. The result of maxswapchunks times swchunk times the device block size needs to be equal or greater than than the swap area to use it.
Mom 6
Dave Wherry
Esteemed Contributor

Re: RAM & Swap

It depends.
How is your application performing now? Is the system swapping?
Those Oracle and SAP recomendations are just rules of thumb, most dating back to when systems had small amounts of main memory.
I ran a Prime mini-computer that supported a 20 person accounting department. It had 32MB of memory and we did not swap that much because the memory requirements were low.
I've run an SAP environment where the server had 8GB of memory and we had no swapping because the memory was more than adequate for our environment. However, SAP would not start unless there was at least 24GB (3 times) of swap. We didn't use it but, SAP checked for it abended if it was not there.
Oracle, any database for that matter, loves memory. Usually the more the better. But, if it's a small data set, low number of concurrent users, efficiently written code, your 512MB could be fine. And, if it's not swapping you don't need it.
It depends.
Todd McDaniel_1
Honored Contributor

Re: RAM & Swap

For me 3x swap vs ram is unreasonable... with 36GB of RAM on one box and 72GB on another box...

As stated after you pass a threshold, there is only a certain amount of swap which your system can even use as based on your maxswapchunk.

On my Superdome is set at 13481.swchunk is 2048 = 27GB. And I have 27GB of swap. so I am maximized for my swap.

Make sure if you have swap that your swchunk is set high enough to allow you to use all of your swap, whatever it is set at.

# kmtune |grep chunk
maxswapchunks 13481 - 13481
swchunk 2048 - 2048


root:/root
# bc
2048*13481
27609088
quit
chpcfas1-root:/root
# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024000 0 1024000 0% 0 - 1 /dev/vg00/swap
dev 16343040 0 16343040 0% 0 - 0 /dev/vg01/swap1
dev 10240000 0 10240000 0% 0 - 0 /dev/vg01/swap2
Unix, the other white meat.
Patrick Wallek
Honored Contributor

Re: RAM & Swap

With most current machines, and the price of RAM, if you EVER actually NEED to use swap space then something is not quite right. My goal for ALL of my machines is to never ever ever actually use swap space.

The "requirement" of 3 times RAM for swap space is ridiculous! Companies need to come back to the real world, especially with multi-multi-GB of RAM in server.

Sorry for the RANT, but this is one of my BIG pet peeves!
Victor BERRIDGE
Honored Contributor

Re: RAM & Swap

There's nothing to worry about...
You already have a 512 MB primary swap, just add a second of same size elsewhere and you should be fine...
You can do this using SAM...

What is the size of you database?

Since you have limited RAM be carefull with the SGA size and tune correctly your filesystems if they are VXFS - You do have Online-JFS?
I did have a E55 with HPUX10.20 with 2 oracle instances (7.2.3 nad 7.3.3) running...

All the best

Victor
Jeff Schussele
Honored Contributor

Re: RAM & Swap

Hi,

It's been my experience that Oracle only needs that much swap for it's piggish GUI install.
After install you can back off that swap size to a more reasonable value. We go 1 - to - 1 for RAM & swap and never have problems running Oracle. Sometimes we need more swap simply for reservation purposes to allow a lot of applications to startup, but they never actually use it - they just reserve it.

BUT your system simply does *not* have enough RAM to run Oracle. We use no less than 4Gb on our development & test systems & larger sizes for production systems.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: RAM & Swap

Let me add my 1 cent to Jeff's two.

I was trying to tell you the same thing. He did a better job.

We have a 2 GB floor on memory for our rp5450 servers.

We did get away with 1 GB on a D380 production environment, but most people would say that was not a heavy use environment.

Get 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
Todd McDaniel_1
Honored Contributor

Re: RAM & Swap

No Points here...


But I thought that HPUX "recommended" 2GB of Memory? Or I think that is required for Vpar/Npars...

I could be wrong.
Unix, the other white meat.
Victor BERRIDGE
Honored Contributor

Re: RAM & Swap

Hi again,
I erased the end part of my previous reply, you should have read "configured with 256 MB of RAM"...
I just checked and found a D210 still running with 10.20 and oracle 7.2.3 with 128MB RAM and 300 MB swap
there is also a D220 with 10.20 with 3 instances (2 7.2.3 & a 7.3.3) with 1 GB RAM and 1 GB swap...


All the best

Victor
Ted Buis
Honored Contributor

Re: RAM & Swap

Since Todd mentioned it, the absolute minimum amount of RAM for HP-UX is:
10.20 - 32MB
11.0 32 bit - 32MB
11.0 64 bit - 64MB
11.11 - 256MB
However, the recommended minimum for 11.0 and 11i 64-bit is 512MB RAM, but the ideal minimum starts at 2GB. Still, I wouldn't suggest that you do Oracle with less than 1 GB of RAM in general. Generally, I would recommend increasing RAM also with more processors, so that you have something in RAM for those CPUs to use, rather than waiting on an I/O.

Mom 6
Dave Wherry
Esteemed Contributor

Re: RAM & Swap

Jeff and SEP had some good comments about their minimum memory on their servers which are both good recomendations.
You are running UX 10.2 so is that 32 bit Oracle you have? If so you're limited to 1.75GB of shared memory so a large memory system will not benefit you any way. Unless you start playing with memory windows.
Bill Hassell
Honored Contributor

Re: RAM & Swap

NOTE: HP recommended RAM is to allow HP-UX to bootup and run SAM--nothing more. Oracle is an expensive product that can perform extremely well unless it has to swap. Then it is a dog, as any other application will be when access to memory faces a 100:1 penalty. 512megs is critcally short. If you add additional swap then at least the processes will run but other than a very simple database with very few users, Oracle will spend the vast majority of its time waiting for memory.

Now 10.20 (which is obsolete and unsupported) can only run in 32bit mode so the maximum memory you can use is 3.75Gb. Anything beyond that cannot be addressed by HP-UX or applications. If you are happy with the performance of the database and comfortable that 10.20 has not been patched for a year (and never will be in the future), then just add more swap whenever the programs need more RAM.


Bill Hassell, sysadmin