От: Jason Lustig
Тема: Slow Postgresql server
Дата: ,
Msg-id: 57271CC2-BCB1-4ACA-A177-4FF64F1BC33F@brandeis.edu
(см: обсуждение, исходный текст)
Ответы: Re: Slow Postgresql server  (Dennis Bjorklund)
Re: Slow Postgresql server  (Jeff Frost)
Re: Slow Postgresql server  (Ron)
Список: pgsql-performance

Скрыть дерево обсуждения

Slow Postgresql server  (Jason Lustig, )
 Re: Slow Postgresql server  (Dennis Bjorklund, )
 Re: Slow Postgresql server  (Jeff Frost, )
 Re: Slow Postgresql server  (Ron, )
  Re: Slow Postgresql server  (Guido Neitzer, )
   Re: Slow Postgresql server  (Ron, )
    Re: Slow Postgresql server  (Guido Neitzer, )
     Re: Slow Postgresql server  (Scott Marlowe, )
      Re: Slow Postgresql server  (Jeff Frost, )
       Re: Slow Postgresql server  (Carlos Moreno, )
       Strangely Variable Query Performance  (Steve, )
        Re: Strangely Variable Query Performance  (Tom Lane, )
         Re: Strangely Variable Query Performance  (Steve, )
          Re: Strangely Variable Query Performance  (Tom Lane, )
           Re: Strangely Variable Query Performance  (Steve, )
            Re: Strangely Variable Query Performance  (Tom Lane, )
             Re: Strangely Variable Query Performance  (Steve, )
        Re: Strangely Variable Query Performance  (Scott Marlowe, )
         Re: Strangely Variable Query Performance  (Steve, )
          Re: Strangely Variable Query Performance  (Scott Marlowe, )
           Re: Strangely Variable Query Performance  (Steve, )
           Re: Strangely Variable Query Performance  (Tom Lane, )
            Re: Strangely Variable Query Performance  (Steve, )
             Re: Strangely Variable Query Performance  (Tom Lane, )
              Re: Strangely Variable Query Performance  (Steve, )
             Re: Strangely Variable Query Performance  (Tom Lane, )
              Re: Strangely Variable Query Performance  (Steve, )
               Re: Strangely Variable Query Performance  (Tom Lane, )
                Re: Strangely Variable Query Performance  (Steve, )
                 Re: Strangely Variable Query Performance  (Tom Lane, )
                  Re: Strangely Variable Query Performance  (Steve, )
                   Re: Strangely Variable Query Performance  (Tom Lane, )
                   Re: Strangely Variable Query Performance  (Tom Lane, )
                    Re: Strangely Variable Query Performance  (Steve, )
                     Re: Strangely Variable Query Performance  (Tom Lane, )
                      Fwd: Strangely Variable Query Performance  ("Robins Tharakan", )
                     choose_bitmap_and again (was Re: Strangely Variable Query Performance)  (Tom Lane, )
                      Re: [HACKERS] choose_bitmap_and again (was Re: Strangely Variable Query Performance)  (Alvaro Herrera, )
                       Re: [HACKERS] choose_bitmap_and again (was Re: Strangely Variable Query Performance)  (Tom Lane, )
                       Re: [HACKERS] choose_bitmap_and again (was Re: Strangely Variable Query Performance)  (Tom Lane, )
              Re: Strangely Variable Query Performance  (Steve, )
             Re: [HACKERS] choose_bitmap_and again (was Re: Strangely Variable Query Performance)  (Tom Lane, )
 Re: Slow Postgresql server  (Jeff Frost, )
  Re: Slow Postgresql server  (Jason Lustig, )
   Re: Slow Postgresql server  (Guido Neitzer, )
 Fwd: Strangely Variable Query Performance  (Robins, )
  Re: Fwd: Strangely Variable Query Performance  (Tom Lane, )

Hello all,

My website has been having issues with our new Linux/PostgreSQL
server being somewhat slow. I have done tests using Apache Benchmark
and for pages that do not connect to Postgres, the speeds are much
faster (334 requests/second v. 1-2 requests/second), so it seems that
Postgres is what's causing the problem and not Apache. I did some
reserach, and it seems that the bottleneck is in fact the hard
drives! Here's an excerpt from vmstat:

procs -----------memory---------- ---swap-- -----io---- --system--
-----cpu------
r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us
sy id wa st
1  1    140  24780 166636 575144    0    0     0  3900 1462  3299  1
4 49 48  0
0  1    140  24780 166636 575144    0    0     0  3828 1455  3391  0
4 48 48  0
1  1    140  24780 166636 575144    0    0     0  2440  960  2033  0
3 48 48  0
0  1    140  24780 166636 575144    0    0     0  2552 1001  2131  0
2 50 49  0
0  1    140  24780 166636 575144    0    0     0  3188 1233  2755  0
3 49 48  0
0  1    140  24780 166636 575144    0    0     0  2048  868  1812  0
2 49 49  0
0  1    140  24780 166636 575144    0    0     0  2720 1094  2386  0
3 49 49  0

As you can see, almost 50% of the CPU is waiting on I/O. This doesn't
seem like it should be happening, however, since we are using a RAID
1 setup (160+160). We have 1GB ram, and have upped shared_buffers to
13000 and work_mem to 8096. What would cause the computer to only use
such a small percentage of the CPU, with more than half of it waiting
on I/O requests?

Thanks a lot
Jason



В списке pgsql-performance по дате сообщения:

От: Jeff Frost
Дата:
Сообщение: Re: Slow Postgresql server
От: Ron
Дата:
Сообщение: Re: Slow Postgresql server