On Thu, 2005-04-28 at 22:21, p dont think wrote: [............] > > Hrm. Have you done any special tweaking to your postgres setup to make > it as highly responsive as you obviously need it to be? >
- postgresql 7.4.7 in a server with 4GB ram and 2 x Intel(R) Xeon(TM)
CPU 2.80GHz.
- Backup/logs/WAL and data/indexes in two different raid-1 arrays with
10K scsi disks.
- "pgsql.allow_persistent = On" in the php.ini of all webservers.
- "Vacuum analyze" of the session table once an hour.
- We used this function ;) in the bash script we use to install
postgresql databases:
----------------------------------------------------------
memory(){
let MEMTOTAL=`egrep "^Mem:(.*)" /proc/meminfo |awk -F ' ' '{print
$2}'`
let MAXCONNECTIONS=600
if [ $UNAME = Linux ]; then
if [ $MEMTOTAL -lt 1050624000 ]; then
SHAREDBUFFERS=4096
elif [ $MEMTOTAL -ge 1050624000 ] && [ $MEMTOTAL -le 2101248000 ];
then
SHAREDBUFFERS=8192
elif [ $MEMTOTAL -gt 2101248000 ]; then
SHAREDBUFFERS=16384
fi
MAX_CONNECTIONS="max_connections = $MAXCONNECTIONS"
SHARED_BUFFERS="shared_buffers = $SHAREDBUFFERS"
MAX_FSM_RELATION="max_fsm_relations = 1000"
MAX_FSM_PAGES="max_fsm_pages = 20000"
WAL_BUFFERS="wal_buffers = 64"
CHECKPOINT_SEGMENTS="checkpoint_segments = 16"
RANDOM_PAGE_COST="random_page_cost = 2"
SORT_MEM="sort_mem = 4096"
VACUUM_MEM="vacuum_mem = 32768"
EFFECTIVE_CACHE_SIZE="effective_cache_size =
$((MEMTOTAL*25/100/1024/8))"
KERNEL_SHMMAX="kernel.shmmax = $(((250 + (8*SHAREDBUFFERS) +
(14*MAXCONNECTIONS))*2*1024))"
KERNEL_SHMALL="kernel.shmall = $(((250 + (8*SHAREDBUFFERS) +
(14*MAXCONNECTIONS))*2*1024))"
fi
}
----------------------------------------------------------
--
Rafael Martinez, <[EMAIL PROTECTED]>
Center for Information Technology Services
University of Oslo, Norway
PGP Public Key: http://folk.uio.no/rafael/
signature.asc
Description: This is a digitally signed message part
