Re: [GENERAL] Database in RAM - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: [GENERAL] Database in RAM
Date
Msg-id 200105032307.f43N71O07138@candle.pha.pa.us
Whole thread Raw
List pgsql-docs
> >         http://candle.pha.pa.us/main/writings/pgsql/performance/index.html
> >
> > It talks about memory usage and performance.
>
>
> Bruce, this is a very helpful and informative article.  Thanks!


Thanks.


> BTW, this command had no effect on my redhat 6.2 system (1GB RAM):
>
> # whoami
> root
> # uname -a
> Linux bingo 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686 unknown
> # cat /proc/sys/kernel/shmall
> 4194304
> # echo 134217728 > /proc/sys/kernel/shmall
> # cat /proc/sys/kernel/shmall
> 4194304
>
> It is possible I hosed something about my system as I recently began my
> first whack at upgrading a linux kernel.

The SGML docs say that should work.  I don't know because I don't use
Linux here.  The SGML is at:

    http://postgresql.readysetnet.com/devel-corner/docs/admin/kernel-resources.html#SYSVIPC

Let me CC docs on this.

---------------------------------------------------------------------------


Linux

     The default shared memory limit (both SHMMAX and SHMALL) is 32 MB in 2.2 kernels, but it can be changed in the
     proc file system (without reboot). For example, to allow 128 MB:

     $ echo 134217728 >/proc/sys/kernel/shmall
     $ echo 134217728 >/proc/sys/kernel/shmmax

     You could put these commands into a script run at boot-time.

     Alternatively, you can use sysctl, if available, to control these parameters. Look for a file called
     /etc/sysctl.conf and add lines like the following to it:

     kernel.shmall = 134217728
     kernel.shmmax = 134217728

     This file is usually processed at boot time, but sysctl can also be called explicitly later.

     Other parameters are sufficiently sized for any application. If you want to see for yourself look into
     /usr/src/linux/include/asm-xxx/shmparam.h and /usr/src/linux/include/linux/sem.h.


--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-docs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Update for SHMALL
Next
From: Bruce Momjian
Date:
Subject: Re: Readysetnet FTP mirror broken