Does it make sense to reduce the total shared memory


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Does it make sense to reduce the total shared memory
# 1  
Old 02-22-2017
Does it make sense to reduce the total shared memory

We have several dozen Redhat 5, 6 and 7 servers that are running Oracle databases. On some databases we are using automatic memory management, which uses shared memory. On other databases we are use manual memory management, which does not use shared memory.

When I see that a server is swapping and not using that much shared memory, does it make sense to shrink the amount of shared memory allocated to reduce the swap usage? I have read that setting /dev/shm does not allocate memory. But I wonder if it is still preventing non shared memory from staying in physical memory.

Thanks.

Code:
$ ~ > df -h /dev/shm
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                  26G  5.4G   20G  22% /dev/shm
$ ~ > free -m
             total       used       free     shared    buffers     cached
Mem:         32186      27556       4629          0         30      23724
-/+ buffers/cache:       3801      28384
Swap:        20474       4375      16098

# 2  
Old 02-23-2017
The database will have a configuration for memory that it requires to be real memory rather than being eligible to be swapped. If you exhaust real memory by having too much guaranteed as real memory for all the databases put together, then the server as a whole can suffer. If a general process requires some memory and there is very little swap-able available, then the new process will be almost permanently waiting for swap as it tries to perform whatever it needs.

You don't say what versions of Oracle you are using, but the principle is the same, although they may configure it in different ways.



I hope that this helps,
Robin
# 3  
Old 02-23-2017
Hi Robin, We are mostly using Oracle 11.2.0.3 and 12.1.0.2. Some of our servers are in the AWS cloud and I can change OS parameters there. But for the servers that are running out of our server room, I need to justify any OS changes that I want. By default the servers allocate half the total memory to shared memory whether or not we are using AMM, or shared memory. Hence, I am trying to figure out what benefits we would get from shrinking /dev/shm on servers where we aren't using shared memory. Would it even make a difference.

---------- Post updated at 10:40 AM ---------- Previous update was at 10:11 AM ----------

For example, I increased the AMM memory on two databases on this server
from 1GB to 3GB, and the total memory allocated when down.

It just seems like Redhat is holding onto shared memory that would be better
off not being shred memory, thus reducing the amount of swap being used.
There are 12 databases on this server, most do not use shared memory.

Code:
BEFORE INCREASE
$: ~ > free -m
             total       used       free     shared    buffers     cached
Mem:         32186      31987        198          0        872      26785
-/+ buffers/cache:       4329      27856
Swap:        20474       4340      16133

$: ~ > df -h /dev/shm
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                  26G  5.4G   20G  22% /dev/shm

AFTER INCREASE
$: ~/scripts/sql > free -m
             total       used       free     shared    buffers     cached
Mem:         32186      29764       2421          0       1038      24912
-/+ buffers/cache:       3813      28372
Swap:        20474       4254      16220

$: ~/scripts/sql > df -h /dev/shm
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                  26G  8.1G   18G  32% /dev/shm

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX flag to reduce size of shared file

I am using xlC (Version: 11.01.0000.0011). While build i am using "-g" to have debug information in build. there are many object files (>500) due to which resultant shared file (.so) will have huge size. I can't reduce optimization level. Is there any way or flag is present by using which i... (2 Replies)
Discussion started by: Abhi04
2 Replies

2. Cybersecurity

Root login in Linux - does it make sense?

I stumbled upon this thread and one aspect of it got me thinking. As i am building a small Linux network right now for a friend i would like to hear your opinion on this. I'd like to respectfully disagree. I think the Linux habit of disabling root login per default is wrong (not entirely... (6 Replies)
Discussion started by: bakunin
6 Replies

3. Programming

Shared library with acces to shared memory.

Hello. I am new to this forum and I would like to ask for advice about low level POSIX programming. I have to implement a POSIX compliant C shared library. A file will have some variables and the shared library will have some functions which need those variables. There is one special... (5 Replies)
Discussion started by: iamjag
5 Replies

4. UNIX for Advanced & Expert Users

sar -d output... does not make sense

Can someone explain the correlation between how sar names the disk drives and how the rest of the OS names the disk drives? sar lists my disk drives as sd0, sd1, sd2, etc..... while format lists my disk drives as c1t0d0, c1t1d0, c1t2d0,etc... And also why sar shows 8 disks but format... (2 Replies)
Discussion started by: s ladd
2 Replies

5. UNIX for Dummies Questions & Answers

trying to make sense of rsync output...

I'm running the following rsync command to sync a directory between the 2 servers: rsync -az --delete --stats /some_dir/ server_name:/some_dir I'm getting the following output: Number of files: 655174 Number of files transferred: 14221 Total file size: 1138531979331 bytes Total... (0 Replies)
Discussion started by: GKnight
0 Replies

6. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

7. UNIX for Dummies Questions & Answers

a for loop that doesn't make sense

I've been referring bash info for processes and came across a structure for a process which is defined like typedef struct process { struct process *next; char ** argv . . . }process; What I don't understand is that in the program there's a for loop which goes like this job... (2 Replies)
Discussion started by: sdsd
2 Replies

8. High Performance Computing

Rocks clusters make sense for educational environments

08-18-2008 11:00 AM Cluster computing has played a pivotal role in the way research is conducted in educational environments. Because the amount of available money and hardware varies between university researchers, often it's necessary to find a clustering solution that can work well on a small... (0 Replies)
Discussion started by: Linux Bot
0 Replies

9. UNIX for Advanced & Expert Users

How to reduce GZIP memory usage

I am using the ZLIB_VERSION "1.2.3" . The memory requirement for Zlib/GZIP compression is stated as /* The memory requirements for deflate are (in bytes): (1 << (windowBits+2)) + (1 << (memLevel+9)) that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) ... (0 Replies)
Discussion started by: Parmod Garg
0 Replies

10. UNIX for Advanced & Expert Users

Shared memory shortage but lots of unused memory

I am running HP-UX B.11.11. I'm increasing a parameter for a database engine so that it uses more memory to buffer the disk drive (to speed up performance). I have over 5GB of memory not being used. But when I try to start the DB with the increased buffer parameter I get told. "Not... (1 Reply)
Discussion started by: cjcamaro
1 Replies
Login or Register to Ask a Question