LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-25-2007, 07:52 PM   #1
g4j31a5
Member
 
Registered: Sep 2006
Distribution: open SuSE 10.0
Posts: 116

Rep: Reputation: 15
Changing the size of "/dev/shm" in openSUSE 10.1


Hi, like the title implies, I want to ask how to change the size of
"/dev/shm" in openSUSE 10.1? I searched the "/etc/sysconfig/kernel" but there's no
"SHMFS_SIZE" line. I tried "mount -o remount,size=$NEWSIZE /dev/shm" but
it said there's no "/dev/shm" in fstab / mtab. What should I do?

Thanks in advance.
 
Old 04-25-2007, 08:55 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
How about using the kernel parameters kernel.shmmax, kernel.shmall, and kernel.shmmax? If you don’t want to pass these to your bootloader, use sysctl.
 
Old 04-26-2007, 10:55 AM   #3
g4j31a5
Member
 
Registered: Sep 2006
Distribution: open SuSE 10.0
Posts: 116

Original Poster
Rep: Reputation: 15
I've tried that but didn't work. I've tried changing the kernel.shmall & kernel.shmmax to 2 gigs and 4 gigs and rebooted the comp. Then I tried copying 300 megs of files to "/dev/shm" and it said insufficient disk space.
 
Old 04-26-2007, 11:13 AM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by g4j31a5
I've tried changing the kernel.shmall & kernel.shmmax to 2 gigs and 4 gigs and rebooted the comp.
If you changed with sysctl, then rebooted, your changes would be lost… Try changing with sysctl then copying. If you want “permanent” changes, either modify /etc/sysctl.conf or your bootloader’s config file.
 
Old 04-26-2007, 12:18 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,968

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
Shared memory (/dev/shm) is not used very much so you might not have an entry in fstab. I'm not a memory expert and do not know how shmmax relates to POSIX shared memory or Sys V shared memory but AFAIK tmpfs is dynamic i.e. it will use as much memory as needed until you max out your RAM and swap if a max size not specified. AFAIK /dev/shm is for sharing memory between applications and not used as virtual storage. However you can mount say /tmp as tmpfs.

To specify a max size
tmpfs /dev/shm tmpfs defaults,size=8G 0 0

virtual /tmp directory:
tmpfs /tmp tmpfs defaults 0 0

So what are you trying to accomplish?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I switch the labels "/dev/sda1" with "/dev/sda3" vonst Linux - General 10 05-27-2006 10:48 PM
Xorg Will Not Start!? Failed to load "shm" Avieth Linux - Software 9 04-21-2006 03:58 PM
where is "tmpfs", with /dev/shm ? SChipS Linux - General 2 04-28-2005 06:15 PM
Need help changing size of "/" Partition wardialer Mandriva 1 04-22-2005 12:55 AM
What is "/dev/shm" and do I need it?? xmdms Linux - Software 1 02-16-2004 04:40 PM


All times are GMT -5. The time now is 09:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration