From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postgres not using shared memory |
Date: | 2004-12-10 21:39:32 |
Message-ID: | 41BA1794.7030905@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Karl O. Pinc wrote:
> Hi,
>
> I can't seem to get postgresql to use shared memory and performance is
> terrrible.
>
> PostgreSQL 7.4.6 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC)
> 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
>
> $ uname -a
> Linux artsdata 2.4.21-20.0.1.ELsmp #1 SMP Wed Nov 24 20:34:01 EST 2004
> i686 i686 i386 GNU/Linux
>
> $ free
> total used free shared buffers cached
> Mem: 2055336 1614408 440928 0 4240 1488104
> -/+ buffers/cache: 122064 1933272
> Swap: 2096440 1216 2095224
>
> $ /sbin/sysctl -a | grep shm
> ...
> kernel.shmall = 1073741823
> kernel.shmmax = 1073741823
free will not correctly show shared memory usage if you are allocating
more than
512 megs (I think). I don't recall the exact amount but this is a
limitation of free.
What type of hard drives do you have? What does a sar 1 or iostat report?
Sincerely,
Joshua D. Drake
> (I had both above 1 larger, and tried cutting it down by one out of
> endpoint paranoia. That should be 1GB.)
>
> postgresql.conf:
> #shared_buffers = 126976 # 1GB - 32MB (just to leave some
> below kernel limit)
> shared_buffers = 6000 # testing to get _some_ shared memory
>
> => select * from pg_settings where name = 'shared_buffers';
> name | setting | context | vartype | source
> | min_val | max_val
> ----------------+---------+------------+---------+--------------------+---------+------------
>
> shared_buffers | 6000 | postmaster | integer | configuration file
> | 16 | 2147483647
> (1 row)
>
> I've see my setting in pg_settings all along, but free never shows me
> any shared
> memory used.
>
> I've tried shutting down all the other daemons and restarting
> postgresql and nothing
> changes.
>
> What am I doing wrong here?
>
> Thanks.
>
> Karl <kop(at)meme(dot)com>
> Free Software: "You don't pay back, you pay forward."
> -- Robert A. Heinlein
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if
> your
> joining column's datatypes do not match
--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL
Attachment | Content-Type | Size |
---|---|---|
jd.vcf | text/x-vcard | 285 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | John Allgood | 2004-12-10 21:44:30 | Postgres 7.4.6 x86_64 RPMS |
Previous Message | David Goodenough | 2004-12-10 21:36:39 | Re: postgresql and javascript |