Re: Need help in performance tuning.

От: Matthew Wakeling
Тема: Re: Need help in performance tuning.
Дата: ,
Msg-id: alpine.DEB.2.00.1007091621380.2534@aragorn.flymine.org
(см: обсуждение, исходный текст)
Ответ на: Re: Need help in performance tuning.  ("Kevin Grittner")
Ответы: Re: Need help in performance tuning.  ("Kevin Grittner")
Список: pgsql-performance

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

Need help in performance tuning.  (Harpreet singh Wadhwa, )
 Re: Need help in performance tuning.  ("Kevin Grittner", )
 Re: Need help in performance tuning.  (Craig Ringer, )
  Re: Need help in performance tuning.  (Samuel Gendler, )
   Re: Need help in performance tuning.  (Tom Lane, )
    Re: Need help in performance tuning.  (Craig Ringer, )
     Re: Need help in performance tuning.  (Harpreet singh Wadhwa, )
     Re: Need help in performance tuning.  (Craig Ringer, )
     Re: Need help in performance tuning.  (Harpreet singh Wadhwa, )
      Re: Need help in performance tuning.  ("Jorge Montero", )
     Re: Need help in performance tuning.  (Bruce Momjian, )
    Re: Need help in performance tuning.  (Brad Nicholson, )
     Re: Need help in performance tuning.  ("Kevin Grittner", )
      Re: Need help in performance tuning.  (Matthew Wakeling, )
       Re: Need help in performance tuning.  ("Kevin Grittner", )
        Re: Need help in performance tuning.  (Matthew Wakeling, )
         Re: Need help in performance tuning.  ("Kevin Grittner", )
          Re: Need help in performance tuning.  ("Jorge Montero", )
           Re: Need help in performance tuning.  ("Kevin Grittner", )
         Re: Need help in performance tuning.  (Greg Smith, )
          Re: Need help in performance tuning.  ("Kevin Grittner", )
           Re: Pooling in Core WAS: Need help in performance tuning.  (Josh Berkus, )
            Re: Pooling in Core WAS: Need help in performance tuning.  (Craig Ringer, )
             Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
              Re: Pooling in Core WAS: Need help in performance tuning.  (Josh Berkus, )
               Re: Pooling in Core WAS: Need help in performance tuning.  (Tom Lane, )
                Re: Pooling in Core WAS: Need help in performance tuning.  (Matthew Wakeling, )
                 Re: Pooling in Core WAS: Need help in performance tuning.  (Craig Ringer, )
                  Re: Pooling in Core WAS: Need help in performance tuning.  ("Kevin Grittner", )
                   Re: Pooling in Core WAS: Need help in performance tuning.  (Rajesh Kumar Mallah, )
                    Re: Pooling in Core WAS: Need help in performance tuning.  (Rajesh Kumar Mallah, )
                    Re: Pooling in Core WAS: Need help in performance tuning.  (Greg Smith, )
                     Re: Pooling in Core WAS: Need help in performance tuning.  (Rajesh Kumar Mallah, )
                     Re: Pooling in Core WAS: Need help in performance tuning.  (Rajesh Kumar Mallah, )
                      Re: Pooling in Core WAS: Need help in performance tuning.  (Rajesh Kumar Mallah, )
                       Re: Pooling in Core WAS: Need help in performance tuning.  (Tatsuo Ishii, )
                        Re: Pooling in Core WAS: Need help in performance tuning.  (Rajesh Kumar Mallah, )
                         Re: Pooling in Core WAS: Need help in performance tuning.  (Tatsuo Ishii, )
                    Re: Pooling in Core WAS: Need help in performance tuning.  (Hannu Krosing, )
                  Re: Pooling in Core WAS: Need help in performance tuning.  (Hannu Krosing, )
                  Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                   Re: Pooling in Core WAS: Need help in performance tuning.  (Andres Freund, )
                    Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                     Re: Pooling in Core WAS: Need help in performance tuning.  (Tom Lane, )
                      Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                       Re: Pooling in Core WAS: Need help in performance tuning.  (Tom Lane, )
                        Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                         Re: Pooling in Core WAS: Need help in performance tuning.  (Tom Lane, )
                        Re: Pooling in Core WAS: Need help in performance tuning.  (Vitalii Tymchyshyn, )
                        Re: Pooling in Core WAS: Need help in performance tuning.  (Josh Berkus, )
                         Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                          Re: Pooling in Core WAS: Need help in performance tuning.  (Tom Lane, )
                           Re: Pooling in Core WAS: Need help in performance tuning.  (Andres Freund, )
                           Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                            Re: Pooling in Core WAS: Need help in performance tuning.  (Josh Berkus, )
                      Re: Pooling in Core WAS: Need help in performance tuning.  (Craig Ringer, )
                  Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                   Re: Pooling in Core WAS: Need help in performance tuning.  ("Joshua D. Drake", )
                    Re: Pooling in Core WAS: Need help in performance tuning.  (Hannu Krosing, )
                     Re: Pooling in Core WAS: Need help in performance tuning.  ("Joshua D. Drake", )
                      Re: Pooling in Core WAS: Need help in performance tuning.  (Hannu Krosing, )
                     Re: Pooling in Core WAS: Need help in performance tuning.  ("Joshua D. Drake", )
                   Re: Pooling in Core WAS: Need help in performance tuning.  (Hannu Krosing, )
                    Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                     Re: Pooling in Core WAS: Need help in performance tuning.  (Hannu Krosing, )
                      Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                       Re: Pooling in Core WAS: Need help in performance tuning.  (Andres Freund, )
                       Re: Pooling in Core WAS: Need help in performance tuning.  (Craig Ringer, )
                        Re: Pooling in Core WAS: Need help in performance tuning.  (Robert Haas, )
                   Re: Pooling in Core WAS: Need help in performance tuning.  (Scott Carey, )
                    Re: Pooling in Core WAS: Need help in performance tuning.  (Joshua Tolley, )
                     Re: Pooling in Core WAS: Need help in performance tuning.  (Greg Smith, )
                      Re: Pooling in Core WAS: Need help in performance tuning.  (Andres Freund, )
                      Re: Pooling in Core WAS: Need help in performance tuning.  (Craig Ringer, )
                       Re: Pooling in Core WAS: Need help in performance tuning.  (Dimitri Fontaine, )
                       Re: Pooling in Core WAS: Need help in performance tuning.  (Hannu Krosing, )
                   Re: Pooling in Core WAS: Need help in performance tuning.  ("Joshua D. Drake", )
                Re: Pooling in Core WAS: Need help in performance tuning.  (Dimitri Fontaine, )
                 Re: Pooling in Core WAS: Need help in performance tuning.  (Magnus Hagander, )
             Re: Pooling in Core WAS: Need help in performance tuning.  (Scott Carey, )
            Re: Pooling in Core WAS: Need help in performance tuning.  (Samuel Gendler, )
          Re: Need help in performance tuning.  (Jesper Krogh, )
           Re: Need help in performance tuning.  (Greg Smith, )
            Re: Need help in performance tuning.  ("Pierre C", )
     Re: Need help in performance tuning.  (Mark Kirkwood, )
    Re: Need help in performance tuning.  (Robert Haas, )
    Re: Need help in performance tuning.  (Hannu Krosing, )
     Re: Need help in performance tuning.  (Scott Marlowe, )
      Re: Need help in performance tuning.  ("Kevin Grittner", )
       Re: Need help in performance tuning.  (Hannu Krosing, )
 Re: Pooling in Core WAS: Need help in performance tuning.  (Rajesh Kumar Mallah, )

On Fri, 9 Jul 2010, Kevin Grittner wrote:
> Any thoughts on the "minimalist" solution I suggested a couple weeks
> ago?:
>
> http://archives.postgresql.org/pgsql-hackers/2010-06/msg01385.php
> http://archives.postgresql.org/pgsql-hackers/2010-06/msg01387.php
>
> So far, there has been no comment by anyone....

Interesting idea. As far as I can see, you are suggesting solving the too
many connections problem by allowing lots of connections, but only
allowing a certain number to do anything at a time?

A proper connection pool provides the following advantages over this:

1. Pool can be on a separate machine or machines, spreading load.
2. Pool has a lightweight footprint per connection, whereas Postgres
    doesn't.
3. A large amount of the overhead is sometimes connection setup, which
    this would not solve. A pool has cheap setup.
4. This could cause Postgres backends to be holding onto large amounts of
    memory while being prevented from doing anything, which is a bad use of
    resources.
5. A fair amount of the overhead is caused by context-switching between
    backends. The more backends, the less useful any CPU caches.
6. There are some internal workings of Postgres that involve keeping all
    the backends informed about something going on. The more backends, the
    greater this overhead is. (This was pretty bad with the sinval queue
    overflowing a while back, but a bit better now. It still causes some
    overhead).
7. That lock would have a metric *($!-load of contention.

Matthew

--
 Unfortunately, university regulations probably prohibit me from eating
 small children in front of the lecture class.
                                        -- Computer Science Lecturer


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

От: Robert Haas
Дата:
Сообщение: Re: Need help in performance tuning.
От: Jeremy Palmer
Дата:
Сообщение: Index usage with functions in where condition