Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26th January 2012, 01:13 PM
huggyfee Offline
Registered User
 
Join Date: Jan 2012
Location: Ipswich, UK
Posts: 3
windows_7firefox
Need to change /dev/shm shared memory but not in /etc/fstab on R16

I installed Fedora R16 in a VirtualBox VM no problem, but the initial memory setting was a bit too conservative.

Consequently, if I do:

Code:
df -k | grep shm
I get:

tmpfs 1026340 92 1026248 1% /dev/shm

and I need this to be a bit bigger - indeed, 4x would be great!

So I try looking in /etc/fstab but there's no entry for this mountpoint. Eek!

Code:
#
# /etc/fstab
# Created by anaconda on Tue Jan 24 22:40:33 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=c2d44a8a-92a2-4dc8-a23f-7fc40291a965 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home /home                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
I look in /mount/grub2 directory config file(s) - nothing obvious here.

So - how is this getting mounted?

If I do:

Code:
mount -o remount,size=4G /dev/shm
then this temporarily sorts my problem, but it just comes back on startup.

What I don't want to do is add this to /etc/fstab if this is going to try to effectively do the same thing in two different places - who knows which would be executed first etc.

So - anyone know what I need to do to automount a revised size /dev/shm shared memory mountpoint on startup?

Thanks,

Simon.
Reply With Quote
  #2  
Old 26th January 2012, 02:26 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126
linuxfirefox
Re: Need to change /dev/shm shared memory but not in /etc/fstab on R16

Your swap fs is listed in your fstab file.
Code:
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
What does this report for size?
Code:
df -hT /dev/mapper/VolGroup-lv_swap
Reply With Quote
  #3  
Old 26th January 2012, 03:45 PM
huggyfee Offline
Registered User
 
Join Date: Jan 2012
Location: Ipswich, UK
Posts: 3
windows_7firefox
Re: Need to change /dev/shm shared memory but not in /etc/fstab on R16

Thanks for the quick response.

That gives me:

Code:
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs  993M     0  993M   0% /dev
Reply With Quote
  #4  
Old 27th January 2012, 01:04 AM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Need to change /dev/shm shared memory but not in /etc/fstab on R16

You really wouldn't want it to be much larger.

tmpfs defaults to half of your RAM size (and half of the number of RAM pages). That is space that the OOM (Out Of Memory) handler can't free up in the case of low memory conditions. If you use too much as tmpfs, then your system WILL deadlock.

But, you can change the size if you wish by adding it to your /etc/fstab (change size to what you wish)

Code:
tmpfs                   /dev/shm                tmpfs   size=4g        0 0
You can test it out without doing a reboot by remounting tmpfs
Code:
mount -o remount tmpfs
Reply With Quote
  #5  
Old 27th January 2012, 01:33 AM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126
linuxfirefox
Re: Need to change /dev/shm shared memory but not in /etc/fstab on R16

As is, the OP already has ~2GB of swap space. Almost 1GB (993M) in /dev/mapper/VolGroup-lv_swap and 1GB in /dev/shm. Increasing /dev/shm to 4GB would give him a total of ~5GB swap space. And has anyone bothered to do:
Code:
ls -l /dev/shm
It just might surprise you.
Reply With Quote
  #6  
Old 27th January 2012, 09:53 AM
huggyfee Offline
Registered User
 
Join Date: Jan 2012
Location: Ipswich, UK
Posts: 3
windows_7firefox
Re: Need to change /dev/shm shared memory but not in /etc/fstab on R16

Sorry, I should have clarified my intention for this local VM - I've installed Oracle 11i rel 2 DB, which was fine, but when I tried starting the database, I get '[ORA-00845: MEMORY_TARGET not supported on this system]' - Oracle has shared memory requirements over and above what is reasonable.

So I *could* change oracle parameters to make it match what the OS thinks is reasonable, but having tried temporarily remounting /dev/shm as a larger space, this did allow me start the DB. I have also increased the memory allocated to the VM to help reduce the chances of actually having to use this space.

Code:
ls -l /dev/shm
gives me:
Code:
[root@localhost ~]# ls -l /dev/shm
total 232
-r-------- 1 inquira inquira 67108904 Jan 27 09:09 pulse-shm-1154165621
-r-------- 1 gdm     gdm     67108904 Jan 27 09:08 pulse-shm-1196137821
-r-------- 1 inquira inquira 67108904 Jan 27 09:08 pulse-shm-2888496656
-r-------- 1 inquira inquira 67108904 Jan 27 09:09 pulse-shm-3746723676
-r-------- 1 inquira inquira 67108904 Jan 27 09:08 pulse-shm-3928996198
-r-------- 1 gdm     gdm     67108904 Jan 27 09:08 pulse-shm-4036240913
but I gather that's allocated memory rather than used memory:

Code:
[root@localhost ~]# du -h /dev/shm/*
4.0K	/dev/shm/pulse-shm-1154165621
4.0K	/dev/shm/pulse-shm-1196137821
4.0K	/dev/shm/pulse-shm-2888496656
148K	/dev/shm/pulse-shm-3746723676
68K	/dev/shm/pulse-shm-3928996198
4.0K	/dev/shm/pulse-shm-4036240913
So, anyway - I added the line:
Code:
tmpfs                   /dev/shm                tmpfs   size=4g        0 0
to /etc/fstab and issued:
Code:
mount -o remount tmpfs
so this seems to have done the trick and overriden the default:
Code:
[root@localhost ~]# df | grep /dev/shm
tmpfs                          4194304       232   4194072   1% /dev/shm
and my database starts:
Code:
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ sqlplus / AS SYSDBA

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 27 09:36:05 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1048059904 bytes
Fixed Size		    2219992 bytes
Variable Size		  629145640 bytes
Database Buffers	  411041792 bytes
Redo Buffers		    5652480 bytes
Database mounted.
Database opened.
SQL>
And this of course also works after a reboot.

So - thanks for your help - not an ideal memory configuration, I know, but I can play with the settings once I have a stable installation on my VM.

Thanks again.

Simon.
Reply With Quote
  #7  
Old 27th January 2012, 02:53 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Need to change /dev/shm shared memory but not in /etc/fstab on R16

yea, Oracle seems to want more memory allocated to /dev/shm for some reason. You did about the only thing you could do to run Oracle, and that is increase your tmpfs and what /dev/shm can use.

It would be interesting to see how much of /dev/shm that Oracle actually uses, though.

In your output above, the ls -l output of /dev/shm, you are USING 232 1k blocks, but you could possibly use 67108904 1k blocks total. (You can see the breakdown of what is actually used in your du -h output)

Would be interesting to see the output of du -h /dev/shm/* when you are actually running Oracle and see what it actually uses.
Reply With Quote
Reply

Tags
auto mount, change, memory, or dev or shm, or etc or fstab, r16, shared

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding Shared Memory deepati Programming & Packaging 0 16th October 2008 07:59 AM
shared memory variable.. Maninder Using Fedora 0 9th April 2008 01:44 PM
Can't get my shared partition to load... problem with fstab? sgware Hardware & Laptops 6 2nd August 2006 10:58 AM
no shared memory in FC4 hipcat7173 Using Fedora 2 11th January 2006 09:28 AM
posix shared memory , help me! melihbirim Programming & Packaging 1 7th January 2005 10:53 PM


Current GMT-time: 22:20 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat