LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2012, 07:23 AM   #1
ravindert
Member
 
Registered: Oct 2011
Posts: 68

Rep: Reputation: Disabled
Swap Space required for 96GB RAM


Hi ,

I have 96GB of RAM installed on the server running with Redhat 5.3 64 bit . So can you please let me know how much SWAP space should i allocated the server. As there are 3 oracle databases are running on the server.


Thanks
Ravinder
 
Old 07-12-2012, 07:32 AM   #2
ravindert
Member
 
Registered: Oct 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
Swap Space required for 96GB RAM

Hi ,

I have 96 GB physical RAM installed on the server and it running with the 3 oracle database on it . So can you please let me know how much SWAP space i should allocate to the server.


Thanks
Ravinder
 
Old 07-12-2012, 07:33 AM   #3
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
Forget installed RAM to swap ratio at that level.

The age-old guidelines are not relevant any more.

What is relevant is what you are running, how much RAM it requires and what will happen and what you are prepared to happen when RAM is completely depleted. When you have a 96GiB RAM server and 3 Oracle databases, you should also have an experienced systems administrator with a highly-functional server status monitoring system.

With that being the case, put a notional 4GiB swap partition in place for emergency backup and then ensure that your monitoring system allows you to be notified so you can intervene in the event that free RAM drops below approximately 4GiB.
 
Old 07-12-2012, 07:39 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
I suggest 8GB of swap and after using the system for a while check swap usage. I expect only a few hundred MB of swap would ever get used, so 8GB would be a good safety margin. If several GB of swap is used, then you might need to rethink whether 8GB is enough.

You may have read that swap should be some multiple of physical ram. That was never a good rule and would be very wasteful on a system where you have a lot of ram and will probably only use a few hundred MB of swap.
 
1 members found this post helpful.
Old 07-12-2012, 07:39 AM   #5
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
Please try not to double post.

This thread should be closed.

Ref: https://www.linuxquestions.org/quest...am-4175416336/
 
1 members found this post helpful.
Old 07-12-2012, 08:28 AM   #6
ravindert
Member
 
Registered: Oct 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zordrak View Post
Please try not to double post.

This thread should be closed.

Ref: https://www.linuxquestions.org/quest...am-4175416336/

Thanks for the reply,


Below are the statistics which i have now on the server which are currently running. Currently it has 96 GB of ram and 29 GB of swap space . But database is facing the performance issue . So i am thinking to increase swap space by 134 GB by adding additional swap.Can you please suggest adding more swap will solve the performance issue of the database.


[root@adc3bs19 ~]#
[root@adc3bs19 ~]# free -m
total used free shared buffers cached
Mem: 96672 96432 239 0 22 59635
-/+ buffers/cache: 36774 59897
Swap: 29087 29085 2
[root@adc3bs19 ~]# top
top - 23:26:36 up 223 days, 21:49, 3 users, load average: 32.48, 32.73, 24.21
Tasks: 1183 total, 1 running, 1179 sleeping, 0 stopped, 3 zombie
Cpu(s): 1.3%us, 1.1%sy, 0.0%ni, 49.1%id, 48.0%wa, 0.1%hi, 0.3%si, 0.0%st
Mem: 98992208k total, 98750780k used, 241428k free, 21396k buffers
Swap: 29786104k total, 29785572k used, 532k free, 61498012k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29821 oracle 15 0 70.2g 32g 32g D 0.7 34.3 121:41.65 oracle
25194 oracle 15 0 70.4g 21g 21g S 6.2 22.6 97:31.62 oracle
8470 oracle 15 0 70.2g 15g 15g S 0.0 16.3 1023:00 oracle
8474 oracle 15 0 70.2g 15g 15g S 0.0 16.3 1024:51 oracle
8468 oracle 15 0 70.2g 15g 15g S 0.0 16.1 1028:55 oracle
3977 oracle 16 0 70.3g 10g 10g D 0.7 11.1 7:02.12 oracle
7162 oracle 15 0 70.2g 7.5g 7.5g S 0.0 7.9 31:19.72 oracle
3592 oracle 15 0 70.2g 7.4g 7.4g S 0.0 7.8 27:36.16 oracle
7825 oracle 15 0 70.2g 6.6g 6.6g S 0.0 7.0 71:20.10 oracle
6046 oracle 15 0 70.2g 6.6g 6.6g S 0.0 7.0 22:32.98 oracle
6041 oracle 15 0 70.2g 6.5g 6.5g S 0.0 6.9 26:39.09 oracle
27123 oracle 15 0 70.2g 6.3g 6.3g S 0.0 6.7 46:37.68 oracle
5924 oracle 15 0 70.2g 6.1g 6.1g S 0.0 6.5 7:02.61 oracle
3489 oracle 15 0 70.2g 6.1g 6.1g S 0.0 6.5 10:40.86 oracle
7285 oracle 15 0 70.2g 6.1g 6.1g S 0.0 6.4 34:20.28 oracle
3629 oracle 16 0 70.2g 5.9g 5.8g S 0.0 6.2 7:05.23 oracle
3502 oracle 15 0 70.2g 5.8g 5.8g S 0.0 6.1 6:00.49 oracle
7253 oracle 15 0 70.2g 5.6g 5.6g S 0.0 6.0 9:17.19 oracle
3658 oracle 15 0 70.2g 5.6g 5.6g S 0.0 5.9 16:22.94 oracle
7191 oracle 15 0 70.2g 5.6g 5.6g S 0.0 5.9 48:01.11 oracle
29818 oracle 15 0 70.1g 5.4g 5.4g S 0.0 5.7 2:43.41 oracle
29906 oracle 16 0 70.1g 5.4g 5.4g S 0.0 5.7 2:39.70 oracle
29901 oracle 15 0 70.1g 5.4g 5.4g S 0.0 5.7 2:38.56 oracle
29820 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:52.27 oracle
29826 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:40.94 oracle
29816 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:33.11 oracle
29886 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:30.00 oracle
29991 oracle 15 0 70.1g 5.3g 5.3g S 0.3 5.7 2:45.20 oracle
29928 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:45.81 oracle
29814 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:26.33 oracle
29823 oracle 15 0 70.1g 5.3g 5.3g S 0.3 5.7 2:34.04 oracle
29910 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:26.16 oracle
29897 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:21.54 oracle
30065 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:24.82 oracle
29842 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:37.25 oracle
30057 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.7 2:32.47 oracle
30060 oracle 15 0 70.1g 5.3g 5.3g S 0.0 5.6 2:26.21 oracle


Thanks
Ravinder
 
Old 07-12-2012, 09:24 AM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
An increase in swap space may produce a slight improvement in performance. But I wouldn't expect any major improvement from increasing swap. You have a LOT of memory used for file caching. Probably you are doing enough file I/O against a large amount of total file space that such file caching is needed for acceptable performance.

If you allocate more swap space, the system will use more swap space and use more ram for file caching, which should give a slight performance improvement.

But it you have a serious performance issue, adjusting swap size is not going to solve it. The fact that the system even wants to use so much swap probably indicates something is misconfigured in Oracle. But I don't know enough about Oracle to offer specific advise.

I think you have too many oracle processes for good performance. I assume there is some configuration option to get fewer processes.

But regardless of how you configure ram or processes, the performance is likely dominated by file I/O. How are your disk drives configured? You might need a higher performance RAID configuration and/or a better distribution of files across drives in order to get the performance you want. Even if you have plenty of disk space to fit all the files, you might need to add disk drives in order to distribute the file I/O load.

Last edited by johnsfine; 07-12-2012 at 09:32 AM.
 
Old 07-12-2012, 10:58 AM   #8
guyonearth
Member
 
Registered: Jun 2012
Location: USA
Distribution: Ubuntu
Posts: 424

Rep: Reputation: 83
How many cpu cores do you have? I'd aim to run one Oracle process per core, if possible.
 
Old 07-12-2012, 06:36 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
I'd be more tempted to run without any swap. Put in a swap file later if it proves to be needed.
 
Old 07-12-2012, 09:14 PM   #10
ravindert
Member
 
Registered: Oct 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by guyonearth View Post
How many cpu cores do you have? I'd aim to run one Oracle process per core, if possible.


Total there are total of 24 CPU and 96 GB of physical RAM installed on the server .
 
Old 07-13-2012, 09:13 AM   #11
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by guyonearth View Post
How many cpu cores do you have? I'd aim to run one Oracle process per core, if possible.
The CPUs are apparently barely used, so the number of cores isn't really relevent to the question of optimizing performance. I don't know enough about Oracle to estimate the level at which too few processes would cause performance issues for any Oracle specific reasons. There appear to be too many Oracle processes for 96GB of ram, so cutting back to 24 processes may be a big improvement. The disk(s) seem to be the major performance limit and a number of processes much less than 24 might be optimal for disk performance.

Quote:
Originally Posted by jefro View Post
I'd be more tempted to run without any swap. Put in a swap file later if it proves to be needed.
Try reading post #4
It is already filling a large swap space.
More generally: with zero swap space it is very hard to tell whether adding swap space would be helpful. In the strange conditions of the OP's system, having zero swap space would make the whole set of problems harder to diagnose. With zero swap space that system would run slightly slower than its current speed and there would be fewer clues about why it is slow. The use of swap space helps interpret the other evidence to deduce too many Oracle processes and/or too few disk drives (used in frequent transfers). So trying with no swap space is generally a bad idea. With a few GB of swap space configured, it is easy to tell if the system could use more swap space.

Last edited by johnsfine; 07-13-2012 at 09:24 AM.
 
Old 07-13-2012, 09:25 AM   #12
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
You are potentially dealing with a few things here:
  1. SGA sizes per DB
  2. Hugepages memory allocation
  3. System tuning
  4. DBA needed tuning and adjustments

Your SGA settings need to be looked at per DB. If you are using above a 4GB SGA on Linux Oracle recommends the use of hugepages.
Hugepages will reduce the overhead on larger SGAs as it will reduce the number of pages by using a larger page of RAM.
Your system may need to have some tuning adjustments (scheduler, limits, aio-nr, etc....)
There may be some settings that the DBAs have put into place that may be detrimental to your system configuration. You may have to work with them to make some adjustments.

Oracle support will probably request a bump in swap if you have less than their installation docs recommend.

Keep in mind that metalink (Oracles Knowledgebase) has quite a bit of this information in it. However, it is not always easy to find.

Last edited by grim76; 07-13-2012 at 09:26 AM. Reason: metalink reference
 
Old 07-15-2012, 05:01 PM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

I merged your two threads, and ask that you refrain from this behaviour in the future.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why size of swap space is 2x of RAM??? Why not 1.5x of RAM or 2.5x of RAM??? Saurav Ghosh Linux - Newbie 7 11-01-2011 03:49 AM
Swap space did not function when physical memory ( RAM ) is full rabbit00 Linux - Newbie 19 07-06-2009 09:18 PM
LXer: Linux: Should You Use Twice the Amount of Ram as Swap Space? LXer Syndicated Linux News 1 11-19-2008 05:02 PM
SWAP space=2*RAM p_test Linux - Enterprise 3 04-27-2006 02:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration