From: | "Steve Wolfe" <steve(at)iboats(dot)com> |
---|---|
To: | <pgsql-general(at)hub(dot)org> |
Subject: | Re: CPU killer |
Date: | 2000-10-30 17:59:27 |
Message-ID: | 007001c0429b$2740dbe0$50824e40@iboats.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> > I've been using Postgres in a Pentium 75Mhz, Linux RedHat 6.2, 32Mb.
> >
> > Every big query I execute uses too much cpu (more than 90%).
> >
> > I start postgres with these params: su -l postgres -c
> > '/usr/bin/postmaster -B 2048 -i -D "/home/postgres/data"' &.
> >
> > What should I do for avoid postgres extreme cpu allocation? I know
sometimes
> > non-indexed tables or huge size tables can be slow, but here I don't
care
> > about execution speed, I just want less cpu allocation no matter how
slow.
First, there's a problem in how you're starting it up. You're telling
Postgres (via the "-B 2048) to allocate 16 megabytes for shared memory
buffers - which leaves only 16 megs for your OS, the database, and every
other process on the system. Large queries are probably filling that up,
forcing the machine to swap quite a bit. Try dropping it to "-B 128" or "-b
256", and see if that makes a difference. And, as was already stated, nice
or renice will help if you want to make sure that other processes get time
on the CPU - but if your query is causing heavy disk I/O on an IDE drive,
you can still expect system responsiveness to drop significantly.
steve
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Lang | 2000-10-30 18:36:19 | Re: postgres on redhat 7.0 |
Previous Message | Lamar Owen | 2000-10-30 17:38:57 | Re: postgres on redhat 7.0 |