Shmmax: Difference between revisions
>Samthecrazyman Created, from Dokuwiki |
>Samthecrazyman m Small tidy up |
||
Line 1: | Line 1: | ||
shmmax is a kernel parameter that defines how much shared memory a program can be allocated. You may need to | shmmax is a kernel parameter that defines how much shared memory a program can be allocated. You may need to increase or decrease this limit for a program to work or for security. This guide will show you how. | ||
== What you need to know == | == What you need to know == | ||
Line 8: | Line 8: | ||
# Open KWrite. | # Open KWrite. | ||
# | # Go to 'File' and then 'Open'. | ||
# You'll need to click 'root' down the left hand side (usually the red folder). Navigate to <code>etc</code>. You then need to find the file <code>sysctl.conf</code> (The full path to the file is <code>/etc/sysctl.conf</code>). | # You'll need to click 'root' down the left hand side (usually the red folder). Navigate to <code>etc</code>. You then need to find the file <code>sysctl.conf</code> (The full path to the file is <code>/etc/sysctl.conf</code>). | ||
# Click at the bottom of the typable area, ready to type. | # Click at the bottom of the typable area, ready to type. | ||
# Type or copy and paste the following statement: <code>kernel.shmmax = <value></code> (<code><value></code> needs replacing with the amount of shared memory you want each program to be allowed. This value is in '''bytes'''. | # Type or copy and paste the following statement: <code>kernel.shmmax = <value></code> (<code><value></code> needs replacing with the amount of shared memory you want each program to be allowed. This value is in '''bytes'''). | ||
# 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)'. | # 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)'. | ||
# Close KWrite and restart your system. | # Close KWrite and restart your system. |
Latest revision as of 14:19, 22 May 2012
shmmax is a kernel parameter that defines how much shared memory a program can be allocated. You may need to increase or decrease 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
- Open KWrite.
- Go to 'File' and then 'Open'.
- You'll need to click 'root' down the left hand side (usually the red folder). Navigate to
etc
. You then need to find the filesysctl.conf
(The full path to the file is/etc/sysctl.conf
). - Click at the bottom of the typable area, ready to type.
- 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). - 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)'.
- Close KWrite and restart your system.
- Once restarted, open Konsole.
- At the command line, type
cat /proc/sys/kernel/shmmax
. - 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.