Shmmax

Revision as of 03:11, 29 February 2012 by >Samthecrazyman (Created, from Dokuwiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

shmmax is a kernel parameter that defines how much shared memory a program can be allocated. You may need to up or down this limit for a program to work or for security. This guide will show you how.

What you need to know

This is a pretty simple procedure. All you need to know is how to use KWrite and Konsole.

Changing shmmax permanently

  1. Open KWrite.
  2. Goto 'File' and then 'Open'.
  3. You'll need to click 'root' down the left hand side (usually the red folder). Navigate to etc. You then need to find the file sysctl.conf (The full path to the file is /etc/sysctl.conf).
  4. Click at the bottom of the typable area, ready to type.
  5. Type or copy and paste the following statement: kernel.shmmax = <value> (<value> needs replacing with the amount of shared memory you want each program to be allowed. This value is in bytes.
  6. Once you have the statement in place, click the 'Save' button across the top toolbar (usually with a floppy disk icon). The title at the top of the window should not read '(Modified)'.
  7. Close KWrite and restart your system.
  8. Once restarted, open Konsole.
  9. At the command line, type cat /proc/sys/kernel/shmmax.
  10. The value should now read the same as the <value> you entered earlier.

Troubleshooting

  • Remember that the <value> must be in bytes.
  • 512MB in PostgreSQL gives the value 572383232 bytes.