lkml.org 
[lkml]   [2000]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: /proc/sys/kernel/shmmax does not increase shared ram
From
Date
Michael Bielicki <Michael.Bielicki@Parmastocks.com> writes:

> Hi,
> I found this effect on both test6 and test7 that if I type:
>
> echo 128000000 > /proc/sys/kernel/shmmax
> it has no real effect on the amount of shared memory.

# uname -a
Linux ls3016 2.4.0-test7 #1 SMP Thu Aug 31 15:12:24 CEST 2000 i686 unknown
# ipcs -ml

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 1048576
max total shared memory (kbytes) = 12240000
min seg size (bytes) = 0

# cat /proc/sys/kernel/shmmax
1073741824
# ./ipctst 1 1073741824 1 0 100
using 1 segs of size 1073741824 (1 iterations)
# ./ipctst 1 1073741825 1 0 100
using 1 segs of size 1073741825 (1 iterations)
shmget (0x1): Invalid argument

So this seems to work.

> besides, what does the output of df on /dev/shm show me ? the amount
> of max shared mem in bytes or kbytes like the other fs ?

Yes, it does. You can increase the maximum overall size with mount
option nr_blocks (in 4K blocks on ia32) and the maximum number of
objects with nr_inodes.

from ipc/shm.c:

* There are the following mount options:
* - nr_blocks (^= shmall) is the number of blocks of size PAGE_SIZE
* we are allowed to allocate
* - nr_inodes (^= shmmni) is the number of files we are allowed to
* allocate
* - mode is the mode for the root directory (default S_IRWXUGO | S_ISVTX)

Greetings
Christoph
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:1.502 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site