pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Pierre C <lists@peufeu.com>
To: Ben Chobot <bench@silentmedia.com>
To: Ryan Wexler <ryan@iridiumsuite.com>
Cc: PostgreSQL - Performance <pgsql-performance@postgresql.org>
Subject: Re: performance on new linux box
Date: Fri, 16 Jul 2010 00:57:28 +0200
Message-ID: <op.vfwp121reorkce@apollo13> (raw )
In-Reply-To: <61C79B98-EDA0-4F5C-B43C-C3387FD1D9C1@silentmedia.com >
References: <AANLkTinVrej5r_uF3As3mF8BW4CYgLGiw2-v2HORsqjM@mail.gmail.com >
<AANLkTilA1_-XNBcjpVLnbuMndC02PSzsQijzK3gNQc3c@mail.gmail.com >
<4C35A23B0200002500033220@gw.wicourts.gov >
<AANLkTilCjMHlvYuHCu5Hf7nd4q5C50Cu5NhTS55F3St9@mail.gmail.com >
<4C360677.1090608@emolecules.com >
<AANLkTiny431UE-qThjeJuGRst2gR0lkdn1UKKTSWfvV9@mail.gmail.com >
<AANLkTin24rAdlEMpohzAVdBXuI37DPofZrpnKxiQLPgL@mail.gmail.com >
<95971335.20100708211351@erwied.eu >
<AANLkTinsne2dhyxzXBb4KMVM_7yixWaUfVtG-WBPxMIq@mail.gmail.com >
<488953776.20100708213233@erwied.eu >
<AANLkTimx5Ug2iAQLv3l5scscART_6fm-wCl10k1nWyti@mail.gmail.com >
<4C35E4CA020000250003327E@gw.wicourts.gov >
<AANLkTino2ep4VyJDA9PVV6FObxHnBlLX3O9z8q19PzfN@mail.gmail.com >
<4C363CAE.7010401@emolecules.com >
<B9A709F368FAAF4DB4B33870F72A141D0106C0E8@CORPUSMX30A.corp.emc.com >
<4C36462E.1080405@emolecules.com >
<822 F9CEE-570F-43F7-980F-A721EA7952D1@richrelevance.com >
<A8F65D92-00A9-433F-83C0-04DEB55D57DF@silentmedia.com >
<AANLkTimP5Ia4aILsde3BbImDRSQXKaLyli0b9kVOOcy6@mail.gmail.com >
<61C79B98-EDA0-4F5C-B43C-C3387FD1D9C1@silentmedia.com >
> 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...
view thread (50+ messages) latest in thread
Message-ID: <op.vfwp121reorkce@apollo13>
Permalink: ../op.vfwp121reorkce@apollo13/
Also on: postgresql.org/message-id/op.vfwp121reorkce@apollo13
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@peufeu.com, bench@silentmedia.com, ryan@iridiumsuite.com
Subject: Re: performance on new linux box
In-Reply-To: <op.vfwp121reorkce@apollo13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox