And run analyze more frequently so the table statistics will update and
the planner will choose better plans.
If you can upgrade to 8 its better.
run Explain Analyze on your problematic queries to see what the planner
does. maybe think about adding indices where there aren't, etc...
also note that the I/O is what mainly affects the run time of the
queries.
It could be possible that your DMA is not activated.
Think about buying a static memory for your WAL files
which is a big bottleneck if you have lots of transactions.
Check the settings of postgres to see if there is enough memory
allocated for it because when it does merge sorts, it spills to disk.
Consider using XFS as the filesystem with 8KB block size because
the default page size of postgres is 8KB anyway.
Think about distributing the load to several computers by using sloany
or other replicators.
That's it for now.


Regards,
        tzahi.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: Monday, February 28, 2005 12:02 PM
> To: Michael Ben-Nes
> Cc: linux-il@linux.org.il
> Subject: Re: CPU idle / iowait
> 
> 
> Quoting Michael Ben-Nes <[EMAIL PROTECTED]>:
> 
> > Hi All
> >
> > Im running a postgres server on IBM machine with 2 Xeon 3G 
> Cpu, 3 GB 
> > Mem and Raid.
> >
> > I decide to upgrade my server from dual AMD MP 2400, 2 GB 
> mem and raid 
> > to this machine because lately my queries became slower. To my 
> > surprise the current server is even slower.
> >
> If your queries became to run slower execute the following 
> command in postgresql shell.
> 
> vacuum full all;
> 
> The is an external script that could be run fron crontab.
> It will run vacuum on your database. Look in postgresql 
> contrib package.
> 
> > After banging my head against the wall for a day or two i 
> noticed that 
> > when the CPU is under heavy load the actual work is small ( 
> divided by 
> > 50% between idle and wait )
> >
> > The OS is Centos Linux 2.4.21 SMP
> >
> > Here is a small cut from dstat. it shows the idle and 
> iowait ( sum of 
> > 99
> > ) and all the other are 1% :(
> >
> > ----total-cpu-usage----
> > usr sys idl wai hiq siq|
> >   1   1  93   5   0   0|
> >   1   0  49  50   0   0|
> >   1   0  50  49   0   0|
> >   0   0  50  50   0   0|
> >   1   0  50  49   0   0|
> >
> > Any idea what could be the problem ?
> >
> 
> ==================
> BannerShift - text ad exchange 
> http://www.bannershift.com/text-ad-exchange/
> 
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] 
> with the word "unsubscribe" in the message body, e.g., run 
> the command echo unsubscribe | mail [EMAIL PROTECTED]
> 
> 
> 



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to