Re: How to improve db performance with $7K?

От: Tom Lane
Тема: Re: How to improve db performance with $7K?
Дата: ,
Msg-id: 28523.1113532916@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: How to improve db performance with $7K?  (Kevin Brown)
Ответы: Re: How to improve db performance with $7K?  (Kevin Brown)
Re: How to improve db performance with $7K?  (Greg Stark)
Список: pgsql-performance

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

How to improve db performance with $7K?  (Steve Poe, )
 Re: How to improve db performance with $7K?  (Tom Lane, )
  Re: How to improve db performance with $7K?  (Steve Poe, )
 Re: How to improve db performance with $7K?  (Will LaShell, )
 Re: How to improve db performance with $7K?  ("Joshua D. Drake", )
  Re: How to improve db performance with $7K?  (Steve Poe, )
   Re: How to improve db performance with $7K?  (Bjoern Metzdorf, )
    Re: How to improve db performance with $7K?  (Josh Berkus, )
     Re: How to improve db performance with $7K?  (Steve Poe, )
      Re: How to improve db performance with $7K?  (Cott Lang, )
       Re: How to improve db performance with $7K?  (Steve Poe, )
        Re: How to improve db performance with $7K?  (Cott Lang, )
         Follow-Up: How to improve db performance with $7K?  (Steve Poe, )
          Re: Follow-Up: How to improve db performance with $7K?  (Thomas F.O'Connell, )
           Re: Follow-Up: How to improve db performance with $7K?  (Kevin Brown, )
            Re: Follow-Up: How to improve db performance with $7K?  ("Steinar H. Gunderson", )
            Re: Follow-Up: How to improve db performance with $7K?  (Thomas F.O'Connell, )
          Re: Follow-Up: How to improve db performance with $7K?  (Vivek Khera, )
           Re: Follow-Up: How to improve db performance with $7K?  (Will LaShell, )
     Re: How to improve db performance with $7K?  (Steve Poe, )
    Re: Follow-Up: How to improve db performance with $7K?  (PFC, )
     Re: Follow-Up: How to improve db performance with $7K?  ("Steinar H. Gunderson", )
   Re: How to improve db performance with $7K?  (PFC, )
    Re: How to improve db performance with $7K?  (Dave Cramer, )
     Re: How to improve db performance with $7K?  (Greg Stark, )
     Re: How to improve db performance with $7K?  (Alex Turner, )
      Re: How to improve db performance with $7K?  (Steve Poe, )
       Re: How to improve db performance with $7K?  (Alex Turner, )
        Re: How to improve db performance with $7K?  (Vivek Khera, )
         Re: How to improve db performance with $7K?  (Alex Turner, )
        Re: How to improve db performance with $7K?  (William Yu, )
         Re: How to improve db performance with $7K?  (Alex Turner, )
          Re: How to improve db performance with $7K?  (William Yu, )
           Re: How to improve db performance with $7K?  (Alex Turner, )
            Re: How to improve db performance with $7K?  ("Jim C. Nasby", )
             Re: How to improve db performance with $7K?  (Alex Turner, )
              Re: How to improve db performance with $7K?  (Alex Turner, )
               Re: How to improve db performance with $7K?  (Alex Turner, )
              Re: How to improve db performance with $7K?  (Greg Stark, )
               Re: How to improve db performance with $7K?  (Alex Turner, )
               Re: How to improve db performance with $7K?  (Tom Lane, )
                Re: How to improve db performance with $7K?  (Kevin Brown, )
                 Re: How to improve db performance with $7K?  (Greg Stark, )
                  Re: How to improve db performance with $7K?  (Kevin Brown, )
                   Re: How to improve db performance with $7K?  (Tom Lane, )
                    Re: How to improve db performance with $7K?  (Kevin Brown, )
                     Re: How to improve db performance with $7K?  (Alex Turner, )
                      Re: How to improve db performance with $7K?  (PFC, )
                     Re: How to improve db performance with $7K?  (Tom Lane, )
                      Re: How to improve db performance with $7K?  (Kevin Brown, )
                       Re: How to improve db performance with $7K?  (Tom Lane, )
                        Re: How to improve db performance with $7K?  (Kevin Brown, )
                      Re: How to improve db performance with $7K?  (Greg Stark, )
                     Re: How to improve db performance with $7K?  (Vivek Khera, )
                      Re: How to improve db performance with $7K?  ("Joshua D. Drake", )
                       Re: How to improve db performance with $7K?  (Vivek Khera, )
                      Re: How to improve db performance with $7K?  (Kevin Brown, )
                    Re: How to improve db performance with $7K?  (Matthew Nuzum, )
                     Re: How to improve db performance with $7K?  ("Jim C. Nasby", )
                   Re: How to improve db performance with $7K?  (Rosser Schwarz, )
                    Re: How to improve db performance with $7K?  (Kevin Brown, )
                   Re: How to improve db performance with $7K?  (Greg Stark, )
                   Re: How to improve db performance with $7K?  (Bruce Momjian, )
                    Re: How to improve db performance with $7K?  (Alex Turner, )
                     Re: How to improve db performance with $7K?  (Alvaro Herrera, )
                     Re: How to improve db performance with $7K?  (Bruce Momjian, )
              Re: How to improve db performance with $7K?  ("Douglas J. Trainor", )
               Re: How to improve db performance with $7K?  (, )
                Re: How to improve db performance with $7K?  (Alex Turner, )
                 Re: How to improve db performance with $7K?  (, )
            Re: How to improve db performance with $7K?  ("Douglas J. Trainor", )
            Re: How to improve db performance with $7K?  (PFC, )
             Re: How to improve db performance with $7K?  (Alan Stange, )
    Re: How to improve db performance with $7K?  (Dave Cramer, )
 Re: How to improve db performance with $7K?  ("Alexander Kirpa", )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
 Re: How to improve db performance with $7K?  ("Matthew Nuzum", )
  Re: How to improve db performance with $7K?  (Greg Stark, )
   Re: How to improve db performance with $7K?  (PFC, )
  Re: How to improve db performance with $7K?  (Tom Lane, )
 Re: How to improve db performance with $7K?  ("Dave Held", )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
  Re: How to improve db performance with $7K?  (Steve Poe, )
   Re: How to improve db performance with $7K?  ("Joshua D. Drake", )
   Re: How to improve db performance with $7K?  (William Yu, )
    Re: How to improve db performance with $7K?  (Greg Stark, )
     Re: How to improve db performance with $7K?  (Alex Turner, )
      Re: How to improve db performance with $7K?  (Greg Stark, )
       Re: How to improve db performance with $7K?  (Alex Turner, )
        Re: How to improve db performance with $7K?  (Jacques Caron, )
         Re: How to improve db performance with $7K?  (Alex Turner, )
          Re: How to improve db performance with $7K?  (Alex Turner, )
           Re: How to improve db performance with $7K?  (Jacques Caron, )
            Re: How to improve db performance with $7K?  (Alex Turner, )
          Re: How to improve db performance with $7K?  (Jacques Caron, )
         Re: How to improve db performance with $7K?  (Greg Stark, )
        Re: How to improve db performance with $7K?  (Alan Stange, )
        Re: How to improve db performance with $7K?  (John A Meinel, )
         Re: How to improve db performance with $7K?  (Alex Turner, )
          Re: How to improve db performance with $7K?  ("Joshua D. Drake", )
           Re: How to improve db performance with $7K?  (Alex Turner, )
        Re: How to improve db performance with $7K?  (Steve Poe, )
         Re: How to improve db performance with $7K?  (Alex Turner, )
     Re: How to improve db performance with $7K?  (Jacques Caron, )
      Re: How to improve db performance with $7K?  ("Jim C. Nasby", )
     Re: How to improve db performance with $7K?  (William Yu, )
 Re: How to improve db performance with $7K?  ("Dave Held", )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
 Re: How to improve db performance with $7K?  ("Dave Held", )
  Re: How to improve db performance with $7K?  ("Jim C. Nasby", )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
  Re: How to improve db performance with $7K?  ("Jim C. Nasby", )
   Re: How to improve db performance with $7K?  (Alex Turner, )
 Re: How to improve db performance with $7K?  ("Dave Held", )
  Re: How to improve db performance with $7K?  (Alex Turner, )
   Re: How to improve db performance with $7K?  (William Yu, )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
  Re: How to improve db performance with $7K?  (Bruce Momjian, )
   Re: How to improve db performance with $7K?  (, )
    Re: How to improve db performance with $7K?  ("Jim C. Nasby", )
     What to do with 6 disks?  (Jeff Frost, )
      Re: What to do with 6 disks?  ("Jim C. Nasby", )
      Re: What to do with 6 disks?  (Josh Berkus, )
       Re: Opteron vs Xeon (Was: What to do with 6 disks?)  (Jeff Frost, )
        Re: Opteron vs Xeon (Was: What to do with 6 disks?)  ("J. Andrew Rogers", )
         Re: Opteron vs Xeon (Was: What to do with 6 disks?)  (Jeff Frost, )
          Re: Opteron vs Xeon (Was: What to do with 6 disks?)  (William Yu, )
        Re: Opteron vs Xeon (Was: What to do with 6 disks?)  (Vivek Khera, )
       Re: What to do with 6 disks?  (Vivek Khera, )
      Re: What to do with 6 disks?  (William Yu, )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
  Re: How to improve db performance with $7K?  (Bruce Momjian, )
  Re: How to improve db performance with $7K?  (Dawid Kuroczko, )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )
 Re: How to improve db performance with $7K?  ("Dave Held", )
 Re: How to improve db performance with $7K?  ("Mohan, Ross", )

Kevin Brown <> writes:
> Tom Lane wrote:
>> The reason this is so much more of a win than it was when ATA was
>> designed is that in modern drives the kernel has very little clue about
>> the physical geometry of the disk.  Variable-size tracks, bad-block
>> sparing, and stuff like that make for a very hard-to-predict mapping
>> from linear sector addresses to actual disk locations.

> What I mean is that when it comes to scheduling disk activity,
> knowledge of the specific physical geometry of the disk isn't really
> important.

Oh?

Yes, you can probably assume that blocks with far-apart numbers are
going to require a big seek, and you might even be right in supposing
that a block with an intermediate number should be read on the way.
But you have no hope at all of making the right decisions at a more
local level --- say, reading various sectors within the same cylinder
in an optimal fashion.  You don't know where the track boundaries are,
so you can't schedule in a way that minimizes rotational latency.
You're best off to throw all the requests at the drive together and
let the drive sort it out.

This is not to say that there's not a place for a kernel-side scheduler
too.  The drive will probably have a fairly limited number of slots in
its command queue.  The optimal thing is for those slots to be filled
with requests that are in the same area of the disk.  So you can still
get some mileage out of an elevator algorithm that works on logical
block numbers to give the drive requests for nearby block numbers at the
same time.  But there's also a lot of use in letting the drive do its
own low-level scheduling.

> My argument is that a sufficiently smart kernel scheduler *should*
> yield performance results that are reasonably close to what you can
> get with that feature.  Perhaps not quite as good, but reasonably
> close.  It shouldn't be an orders-of-magnitude type difference.

That might be the case with respect to decisions about long seeks,
but not with respect to rotational latency.  The kernel simply hasn't
got the information.

            regards, tom lane


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

От: Richard van den Berg
Дата:
Сообщение: Re: Foreign key slows down copy/insert
От: PFC
Дата:
Сообщение: Re: How to improve db performance with $7K?