Google Plus

SHMMAX share Linux memory

Written by Mel Kham on . Posted in Linux tutorials

The Linux kernel has many parameters that may be tuned, and are not well documented. Shared memory has been a big issue with big application like Oracle, Tibco, Webmethods on linux, This is the way to show you how to set limit of your used memory .  




To determine the maximum size of a shared memory segment, run:

# cat /proc/sys/kernel/shmmax

2147483648

 


The default shared memory limit for SHMMAX can be changed in the proc file system without reboot:

# echo 2147483648 > /proc/sys/kernel/shmmax


Alternatively, you can use sysctl(8) to change it:

# sysctl -w kernel.shmmax=2147483648


To make a change permanent, add the following line to the file /etc/sysctl.conf (your setting may vary). This file is used during the boot process.

# echo "kernel.shmmax=2147483648" >> /etc/sysctl.conf

{loadposition user9}

Related Articles By Tags:

{loadposition user1}


For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • haider abbas

    I add
    kernel.shmall = 4294967296
    kernel.shmmax = 4294967296
    in /etc/sysctl.conf

    to increase shared memory
    but when I run the command sysctl -a|grep shmmax it shows
    root@haider-desktop:~# sysctl -a|grep shmmax
    kernel.shmmax = 0
    error: "Invalid argument" reading key "fs.binfmt_misc.register"
    error: permission denied on key ‘net.ipv4.route.flush’
    error: permission denied on key ‘net.ipv6.route.flush’
    root@haider-desktop:~#

    I again run the command /etc/sysctl.conf -w
    then it shows
    root@haider-desktop:~# /etc/sysctl.conf -w
    bash: /etc/sysctl.conf: Permission denied
    root@haider-desktop:~#

    however I am the running these command by root
    I dont understand what is going on what is the actual problem
    again by
    ipcs -l it get

    —— Shared Memory Limits ——–
    max number of segments = 4096
    max seg size (kbytes) = 0
    max total shared memory (kbytes) = 0
    min seg size (bytes) = 1

    —— Semaphore Limits ——–
    max number of arrays = 128
    max semaphores per array = 250
    max semaphores system wide = 32000
    max ops per semop call = 32
    semaphore max value = 32767

    —— Messages: Limits ——–
    max queues system wide = 1668
    max size of message (bytes) = 8192
    default max size of queue (bytes) = 16384

    root@haider-desktop:~#

    with regards
    Dr. Haider Abbas

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

SK

|

I am working on it. Stay tuned. Thanks for the comment.

adriana rizzati

|

You are right, I saw them just now and they are awesome!

SK

|

Thanks for the comment Abdullah. Stay tuned with us always.

Abdullah Musazai

|

Thank you for such a great service you always do, hope you gain more power and more energy to work more & more

Dominik Bauer

|

thx a lot!

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .