Unix Technical Forum

Re: Most effective tuning choices for busy website?

This is a discussion on Re: Most effective tuning choices for busy website? within the Pgsql Performance forums, part of the PostgreSQL category; --> Mark Stosberg wrote: > I've used PQA to analyze my queries and happy overall with how they are > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:50 AM
Neil Conway
 
Posts: n/a
Default Re: Most effective tuning choices for busy website?

Mark Stosberg wrote:
> I've used PQA to analyze my queries and happy overall with how they are
> running. About 55% of the query time is going to variations of the pet
> searching query, which seems like where it should be going. The query is
> frequent and complex. It has already been combed over for appropriate
> indexing.


It might be worth posting the EXPLAIN ANALYZE and relevant schema
definitions for this query, in case there is additional room for
optimization.

> Our hardware: Dual 3 Ghz processors 3 GB RAM, running on FreeBSD.


Disk?

You are presumably using Xeon processors, right? If so, check the list
archives for information on the infamous "context switching storm" that
causes performance problems for some people using SMP Xeons.

-Neil

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:54 AM
Mark Stosberg
 
Posts: n/a
Default Re: Most effective tuning choices for busy website?

Neil Conway wrote:

> Mark Stosberg wrote:
>> I've used PQA to analyze my queries and happy overall with how they are
>> running. About 55% of the query time is going to variations of the pet
>> searching query, which seems like where it should be going. The query is
>> frequent and complex. It has already been combed over for appropriate
>> indexing.

>
> It might be worth posting the EXPLAIN ANALYZE and relevant schema
> definitions for this query, in case there is additional room for
> optimization.
>
>> Our hardware: Dual 3 Ghz processors 3 GB RAM, running on FreeBSD.

>
> Disk?
>
> You are presumably using Xeon processors, right? If so, check the list
> archives for information on the infamous "context switching storm" that
> causes performance problems for some people using SMP Xeons.


I wanted to follow-up to report a positive outcome to tuning this Xeon
SMP machine on FreeBSD. We applied the following techniques, and saw the
average CPU usage drop by about 25%.

- in /etc/sysctl.conf, we set it to use raw RAM for shared memory:
kern.ipc.shm_use_phys=1

- We updated our kernel config and postmaster.conf to set
shared_buffers to about 8000.

- We disabled hyperthreading in the BIOS, which had a label like
"Logical Processors? : Disabled".

I recall there was tweak my co-worker made that's not on my list.

I realize it's not particularly scientific because we changed several things
at once...but at least it is working well enough for now.

Mark



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:47 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com