Re: performance on new linux box

От: Pierre C
Тема: Re: performance on new linux box
Дата: ,
Msg-id: op.vfwp121reorkce@apollo13
(см: обсуждение, исходный текст)
Ответ на: Re: performance on new linux box  (Ben Chobot)
Список: pgsql-performance

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

performance on new linux box  (Ryan Wexler, )
 Re: performance on new linux box  (Tom Lane, )
 Re: performance on new linux box  (Rob Wultsch, )
 Re: performance on new linux box  (Andy Colson, )
  Re: performance on new linux box  (Eliot Gable, )
   Re: performance on new linux box  ("Kevin Grittner", )
    Re: performance on new linux box  (Eliot Gable, )
     Re: performance on new linux box  ("Kevin Grittner", )
      Re: performance on new linux box  (Ryan Wexler, )
       Re: performance on new linux box  ("Joshua D. Drake", )
       Re: performance on new linux boxeradmin(11983)i: STATEMENT: update license set expires= '2010-06-15' where lic  (John Rouillard, )
       Re: performance on new linux box  (Craig James, )
       Re: performance on new linux box  (Russell Smith, )
        Re: performance on new linux box  (Samuel Gendler, )
         Re: performance on new linux box  (Ryan Wexler, )
          Re: performance on new linux box  (Greg Smith, )
          Re: performance on new linux box  (Andy Colson, )
       Re: performance on new linux box  ("Joshua D. Drake", )
 Re: performance on new linux box  ("Pierre C", )
 Fwd: performance on new linux box  (Ryan Wexler, )
  Re: performance on new linux box  (Jochen Erwied, )
   Re: performance on new linux box  (Ryan Wexler, )
    Re: performance on new linux box  ("Kevin Grittner", )
    Re: performance on new linux box  (Jochen Erwied, )
     Re: performance on new linux box  (Ryan Wexler, )
      Re: performance on new linux box  (Ben Chobot, )
      Re: performance on new linux box  ("Kevin Grittner", )
       Re: performance on new linux box  (Ryan Wexler, )
        Re: performance on new linux box  (David Boreham, )
        Re: performance on new linux box  ("Kevin Grittner", )
        Re: performance on new linux box  (Craig James, )
         Re: performance on new linux box  (<>, )
          Re: performance on new linux box  (Craig James, )
           Re: performance on new linux box  (Scott Carey, )
            Re: performance on new linux box  (Ben Chobot, )
             Re: performance on new linux box  (Scott Carey, )
              Re: performance on new linux box  (Ben Chobot, )
               Re: performance on new linux box  (Ryan Wexler, )
                Re: performance on new linux box  (Ben Chobot, )
                 Re: performance on new linux box  (Craig Ringer, )
               Re: performance on new linux box  (Scott Carey, )
                Re: performance on new linux box  (Ben Chobot, )
                Re: performance on new linux box  (Greg Smith, )
              Re: performance on new linux box  (Scott Marlowe, )
               Re: performance on new linux box  (Scott Carey, )
               Re: performance on new linux box  (Craig Ringer, )
            Re: performance on new linux box  (Ryan Wexler, )
          Re: performance on new linux box  (David Boreham, )
   Re: performance on new linux box  (Ryan Wexler, )
    Re: performance on new linux box  (Jochen Erwied, )
 Re: performance on new linux box  (Ben Chobot, )
  Re: performance on new linux box  ("Pierre C", )

> Most (all?) hard drives have cache built into them. Many raid cards have
> cache built into them. When the power dies, all the data in any cache is
> lost, which is why it's dangerous to use it for write caching. For that
> reason, you can attach a BBU to a raid card which keeps the cache alive
> until the power is restored (hopefully). But no hard drive I am aware of
> lets you attach a battery, so using a hard drive's cache for write
> caching will always be dangerous.
>
> That's why many raid cards will always disable write caching on the hard
> drives themselves, and only enable write caching using their own memory
> when a BBU is installed.
>
> Does that make more sense?
>

Actually write cache is only dangerous if the OS and postgres think some
stuff is written to the disk when in fact it is only in the cache and not
written yet. When power is lost, cache contents are SUPPOSED to be lost.
In a normal situation, postgres and the OS assume nothing is written to
the disk (ie, it may be in cache not on disk) until a proper cache flush
is issued and responded to by the hardware. That's what xlog and journals
are for. If the hardware doesn't lie, and the kernel/FS doesn't have any
bugs, no problem. You can't get decent write performance on rotating media
without a write cache somewhere...



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

От: Greg Smith
Дата:
Сообщение: Re: performance on new linux box
От: Heikki Linnakangas
Дата:
Сообщение: Re: now() gives same time within the session