Re: User concurrency thresholding: where do I look?

От: Simon Riggs
Тема: Re: User concurrency thresholding: where do I look?
Дата: ,
Msg-id: 1185180668.4284.149.camel@ebony.site
(см: обсуждение, исходный текст)
Ответ на: Re: User concurrency thresholding: where do I look?  (Tom Lane)
Ответы: Re: User concurrency thresholding: where do I look?  (Tom Lane)
Список: pgsql-performance

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

User concurrency thresholding: where do I look?  (Josh Berkus, )
 Re: User concurrency thresholding: where do I look?  ("Joshua D. Drake", )
 Re: User concurrency thresholding: where do I look?  (Alvaro Herrera, )
  Re: User concurrency thresholding: where do I look?  (Josh Berkus, )
   Re: User concurrency thresholding: where do I look?  (Tom Lane, )
    Re: User concurrency thresholding: where do I look?  (Alvaro Herrera, )
     Re: User concurrency thresholding: where do I look?  (Tom Lane, )
      Re: User concurrency thresholding: where do I look?  (Josh Berkus, )
       Re: User concurrency thresholding: where do I look?  (Tom Lane, )
        Re: User concurrency thresholding: where do I look?  (Josh Berkus, )
         Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
          Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
          Re: User concurrency thresholding: where do I look?  (Tom Lane, )
           Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
            Re: User concurrency thresholding: where do I look?  (Tom Lane, )
             Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
              Re: User concurrency thresholding: where do I look?  (Tom Lane, )
               Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                 Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                 Re: User concurrency thresholding: where do I look?  (David Boreham, )
                  Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                 Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                  Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                   Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                    Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                     Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                      Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                       Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                      Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                       Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                        Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                        Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                         Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                          Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                           Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                            Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                             Re: User concurrency thresholding: where do I look?  (Tom Lane, )
                              Re: User concurrency thresholding: where do I look?  (Robert Lor, )
                             Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                              Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                               Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                                Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                                 Re: User concurrency thresholding: where do I look?  (Alvaro Herrera, )
                                  Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                                 Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
                                  Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                                  Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                                   Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                                    Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                                  Re: User concurrency thresholding: where do I look?  (Josh Berkus, )
                                   Re: User concurrency thresholding: where do I look?  ("Jignesh K. Shah", )
                              CLOG Patch  ("Jignesh K. Shah", )
                               Re: CLOG Patch  ("Simon Riggs", )
                                Re: CLOG Patch  ("Jignesh K. Shah", )
                                 Re: CLOG Patch  ("Simon Riggs", )
                           Re: User concurrency thresholding: where do I look?  ("Simon Riggs", )
       Re: User concurrency thresholding: where do I look?  (Greg Smith, )
        Re: User concurrency thresholding: where do I look?  (Josh Berkus, )
     Re: User concurrency thresholding: where do I look?  ("Joshua D. Drake", )
    Re: User concurrency thresholding: where do I look?  (Gregory Stark, )
 Re: User concurrency thresholding: where do I look?  (Greg Smith, )

On Fri, 2007-07-20 at 16:57 -0400, Tom Lane wrote:
> "Jignesh K. Shah" <> writes:
> > What its saying is that there are holds/waits in trying to get locks
> > which are locked at Solaris user library levels called from the
> > postgresql functions:
> > For example both the following functions are hitting on the same mutex
> > lock  0x10059e280  in Solaris Library call:
> > postgres`AllocSetDelete+0x98
> > postgres`AllocSetAlloc+0x1c4
>
> That's a perfect example of the sort of useless overhead that I was
> complaining of just now in pgsql-patches.  Having malloc/free use
> an internal mutex is necessary in multi-threaded programs, but the
> backend isn't multi-threaded.  And yet, apparently you can't turn
> that off in Solaris.
>
> (Fortunately, the palloc layer is probably insulating us from malloc's
> performance enough that this isn't a huge deal.  But it's annoying.)

There is one thing that the palloc layer doesn't handle: EState. All
other memory contexts have a very well chosen initial allocation that
prevents mallocs during low-medium complexity OLTP workloads.

EState is about 8300 bytes, so just above the large allocation limit.
This means that every time we request an EState, i.e. at least once per
statement we need to malloc() and then later free().

Would it be worth a special case in the palloc system to avoid having to
repeatedly issue external memory allocation calls?

--
  Simon Riggs
  EnterpriseDB  http://www.enterprisedb.com



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

От: "Simon Riggs"
Дата:
Сообщение: Re: User concurrency thresholding: where do I look?
От: Tom Lane
Дата:
Сообщение: Re: User concurrency thresholding: where do I look?