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

От: Jacques Caron
Тема: Re: How to improve db performance with $7K?
Дата: ,
Msg-id: 6.2.0.14.0.20050418183007.03d0ce18@pop.interactivemediafactory.net
(см: обсуждение, исходный текст)
Ответ на: Re: How to improve db performance with $7K?  (Greg Stark)
Ответы: Re: How to improve db performance with $7K?  ("Jim C. Nasby")
Список: 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", )

Hi,

At 16:59 18/04/2005, Greg Stark wrote:

>William Yu <> writes:
>
> > Using the above prices for a fixed budget for RAID-10, you could get:
> >
> > SATA 7200 -- 680MB per $1000
> > SATA 10K  -- 200MB per $1000
> > SCSI 10K  -- 125MB per $1000
>
>What a lot of these analyses miss is that cheaper == faster because cheaper
>means you can buy more spindles for the same price. I'm assuming you picked
>equal sized drives to compare so that 200MB/$1000 for SATA is almost twice as
>many spindles as the 125MB/$1000. That means it would have almost double the
>bandwidth. And the 7200 RPM case would have more than 5x the bandwidth.
>
>While 10k RPM drives have lower seek times, and SCSI drives have a natural
>seek time advantage, under load a RAID array with fewer spindles will start
>hitting contention sooner which results into higher latency. If the controller
>works well the larger SATA arrays above should be able to maintain their
>mediocre latency much better under load than the SCSI array with fewer drives
>would maintain its low latency response time despite its drives' lower average
>seek time.

I would definitely agree. More factors in favor of more cheap drives:
- cheaper drives (7200 rpm) have larger disks (3.7" diameter against 2.6 or
3.3). That means the outer tracks hold more data, and the same amount of
data is held on a smaller area, which means less tracks, which means
reduced seek times. You can roughly count the real average seek time as
(average seek time over full disk * size of dataset / capacity of disk).
And you actually need to physicall seek less often too.

- more disks means less data per disk, which means the data is further
concentrated on outer tracks, which means even lower seek times

Also, what counts is indeed not so much the time it takes to do one single
random seek, but the number of random seeks you can do per second. Hence,
more disks means more seeks per second (if requests are evenly distributed
among all disks, which a good stripe size should achieve).

Not taking into account TCQ/NCQ or write cache optimizations, the important
parameter (random seeks per second) can be approximated as:

N * 1000 / (lat + seek * ds / (N * cap))

Where:
N is the number of disks
lat is the average rotational latency in milliseconds (500/(rpm/60))
seek is the average seek over the full disk in milliseconds
ds is the dataset size
cap is the capacity of each disk

Using this formula and a variety of disks, counting only the disks
themselves (no enclosures, controllers, rack space, power, maintenance...),
trying to maximize the number of seeks/second for a fixed budget (1000
euros) with a dataset size of 100 GB makes SATA drives clear winners: you
can get more than 4000 seeks/second (with 21 x 80GB disks) where SCSI
cannot even make it to the 1400 seek/second point (with 8 x 36 GB disks).
Results can vary quite a lot based on the dataset size, which illustrates
the importance of "staying on the edges" of the disks. I'll try to make the
analysis more complete by counting some of the "overhead" (obviously 21
drives has a lot of other implications!), but I believe SATA drives still
win in theory.

It would be interesting to actually compare this to real-world (or
nearly-real-world) benchmarks to measure the effectiveness of features like
TCQ/NCQ etc.

Jacques.





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

От: Alvaro Herrera
Дата:
Сообщение: Re: How to improve db performance with $7K?
От: Matthew Nuzum
Дата:
Сообщение: Re: How to improve db performance with $7K?