Forum OpenACS Q&A: Any linux kernel tuning instructions
I got a few errors after recompiling PostgreSQL 7.0.2 with the #define BLCKSZ 16384 adjustment. Maybe my kernel is misconfigured. Any particular notes floating around for tuning a OpenACS linux kernel? (or did Don meant the Pg "kernel" when he said kernel in the PostgreSQL tuning instructions)
bash$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data IpcMemoryCreate: shmget failed (Invalid argument) key=5432001, size=1670144, permission=600 This type of error is usually caused by an improper shared memory or System V IPC semaphore configuration. For more information, see the FAQ and platform-specific FAQ's in the source directory pgsql/doc or on our web site at http://www.postgresql.org. FATAL 1: ShmemCreate: cannot create region
What distro are you two running? RH comes with shmem configured reasonably, you don't need to recompile the kernel to get things up and running (though you do need to if you're to use more than 16MB for the Postgres shared buffer space).
Since you didn't specify "-B" when trying to run the postmaster, it's only asking for 64 blocks of shared memory, a bit over a megabyte. Any kernel with shmem or semaphores configured to a reasonable value should have no problem with this.
So ... try Dan's recompile-the-kernel suggestion.
Then, again, my two latest "vanilla" installs of RH were 6.1 and 6.2 respectively, so perhaps with older versions there was a problem. Not sure.
In 6.1 (maybe 6.0) you can change the shmem size without a kernel recompile but you can't change the default allocation addresses, which Postgres uses for portability reasons (I keep meaning to suggest a command-line switch to override these values).
The System V option was set to YES during the last compile and registered via lilo. So that's fine. So I just went ahead and implemented the rest of the OpenACS instructions and did a reboot. I guess that maybe some of the earlier PostgreSQL? or NSD crashes (with the incomplete nsd.tcl modifications and lack of relevant Pg accounts and data models and all) caused the Shmem errors. There were no such complaints with the new boot. Both unpatched (8192) and patched (16384) versions of Pg seems to work fine.
This is now appended to the /etc/rc.d/rc.local:
nohup su -c '/usr/local/pgsql/bin/postmaster -B 1000 -o "-S 2000" -D /usr/local/pgsql/data > /usr/local/pgsql/data/server.log 2>&1' postgres &
I got the main form on lynx localhost and see a set of nsd and postgres daemon in ps aux. Just one question, are the NSD threads suppose to show up on PS? I always thought PS only show processes, not sure.
nsadmin 476 0.1 1.7 9928 9024 ? S 14:21 0:02 /home/aolserver/b nsadmin 484 0.0 1.7 9928 9024 ? S 14:21 0:00 /home/aolserver/b nsadmin 485 0.0 1.7 9928 9024 ? S 14:21 0:00 /home/aolserver/b postgres 486 0.0 0.1 1644 748 ? SN 14:21 0:00 bash -c /usr/loca postgres 487 0.0 0.2 20208 1220 ? SN 14:21 0:00 /usr/local/pgsql/ nsadmin 488 0.0 1.7 9928 9024 ? S 14:21 0:00 /home/aolserver/b nsadmin 490 0.0 1.7 9928 9024 ? S 14:21 0:00 /home/aolserver/b