|
1 | | -This outlines how to increase the number of shared memory buffers |
2 | | -supported by BSD/OS. By default, only 4MB of shared memory is supported |
3 | | -by BSDI. |
| 1 | +This outlines modifications to BSD/OS for running PostgreSQL: |
4 | 2 |
|
5 | | -Keep in mind that shared memory is not pageable. It is locked in RAM. |
| 3 | +1) How to increase resource limits |
| 4 | +2) How to increase the number of shared memory buffers |
6 | 5 |
|
7 | | -Bruce Momjian (pgman@candle.pha.pa.us) |
| 6 | +Bruce Momjian (pgman@candle.pha.pa.us) 2000-06-09 |
8 | 7 |
|
9 | 8 | --------------------------------------------------------------------------- |
10 | 9 |
|
11 | | -Increase SHMMAXPGS by 1024 for every additional 4MB of shared |
12 | | -memory: |
| 10 | +1) To increase the amount of malloc'ed memory and files opened by |
| 11 | +PostgreSQL, add this: |
| 12 | + |
| 13 | + :datasize-cur=600M:\ |
| 14 | + :openfiles-cur=256: |
| 15 | + |
| 16 | +to your /etc/login.conf file. |
| 17 | + |
| 18 | +--------------------------------------------------------------------------- |
| 19 | + |
| 20 | +2a) By default, only 4MB of shared memory is supported by BSDI. Keep in |
| 21 | +mind that shared memory is not pageable. It is locked in RAM. |
| 22 | + |
| 23 | +To increase the number of buffers supported by the postmaseter, increase |
| 24 | +SHMMAXPGS by 1024 for every additional 4MB of shared memory: |
13 | 25 |
|
14 | 26 | /sys/sys/shm.h:69:#define SHMMAXPGS 1024 /* max hardware pages... |
15 | 27 |
|
16 | 28 | The default setting of 1024 is for a maximum of 4MB of shared memory. |
17 | 29 |
|
18 | 30 | For those running 4.1 or later, just recompile the kernel and reboot. |
19 | | -For those running earlier releases,there are more steps outlined below. |
| 31 | +For those running earlier releases,see step 2b. |
20 | 32 |
|
21 | 33 | --------------------------------------------------------------------------- |
22 | 34 |
|
23 | | -Usebpatch to find the sysptsize value for the current kernel. |
24 | | -This is computed dynamically at bootup. |
| 35 | +2b) For 4.01 and earlier, usebpatch to find the sysptsize value for |
| 36 | +the current kernel.This is computed dynamically at bootup. |
25 | 37 |
|
26 | 38 | $ bpatch -r sysptsize |
27 | 39 | 0x9 = 9 |
|