Re: ZFS melting under postgres...

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ivan Voras <ivoras@...>
Cc: <freebsd-current@...>
Date: Saturday, December 15, 2007 - 10:42 pm

On Sat, Dec 15, 2007 at 11:04:04PM +0100, Ivan Voras wrote:

CF and the flash based SSD drives rotate the flash cells anyway, so it
doesn't matter that much if you write the same block or not.
I wouldn't worry about wearing out those devices, since todays media
survive many writes.


I wouldn't do both with them unless required for a specific reason.
The problem is how they work.
They contain NAND flash chips which have two data areas containing
data blocks of typically slightly more than 4 or 8kB these days.
One area is 100% error free with high write rate, but small and the
other is of much less quality, but large.
Devices use the later for the offered data blocks and the good cells
for maintening allocation of them.
One problem is with the data blocks beeing that big, when writing
512 Byte you effectifly do a read-modify-write of a larger physical
block.
This can be handled quite well with larger FS block.
The much bigger problem is with power loss when writing such a
maintenence block.
You loose a very large area of logical blocks when this fails,
since a 4k maintenence block contains the allocation for several hundert
kB of logical data blocks.
In other words - you possibly loose data blocks that were not written
a long time and the database wouldn't expect a problem with that data.
Even for ZIL it is very questionable if you loose a large data area,
since the purpose is to have the data that was already sinced readable
after a power loss.
I'm not sure what happens in case of a device reset in the wrong moment,
possibly this depends on the specific media, but I wouldn't be surprised
to see read errors after a reset without power loss as well.
This is true with all NAND based flash media, SD, MMC, SM, CF, ...
There are medias which are less critical because of the way they utulize
the maintenance blocks, but those things are usually a secret to the
vendor.
I do run PostgreSQL on SD media with ARM based FreeBSD systems, but
I'm prepared to loose the whole database and to recover it from backup
if things go wrong.

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd@bwct.de           info@bwct.de            support@fizon.de
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ZFS melting under postgres..., Peter Losher, (Wed Dec 12, 7:17 pm)
Re: ZFS melting under postgres..., Pawel Jakub Dawidek, (Tue Jan 22, 5:45 am)
Re: ZFS melting under postgres..., Benjamin Close, (Wed Dec 12, 10:55 pm)
Re: ZFS melting under postgres..., Hugo Silva, (Wed Dec 12, 10:58 pm)
Re: ZFS melting under postgres..., Benjamin Close, (Thu Dec 13, 12:25 am)
Re: ZFS melting under postgres..., David Duchscher, (Thu Dec 13, 9:59 am)
Re: ZFS melting under postgres..., Dag-Erling Smørgrav, (Fri Dec 14, 8:57 am)
Re: ZFS melting under postgres..., David Duchscher, (Fri Dec 14, 11:21 am)
Re: ZFS melting under postgres..., Ivan Voras, (Fri Dec 14, 3:29 pm)
Re: ZFS melting under postgres..., Maxim Sobolev, (Fri Dec 14, 11:02 pm)
Re: ZFS melting under postgres..., Ivan Voras, (Sat Dec 15, 6:20 am)
Re: ZFS melting under postgres..., Maxim Sobolev, (Sat Dec 15, 9:30 pm)
Re: ZFS melting under postgres..., Dag-Erling Smørgrav, (Sat Dec 15, 11:57 am)
Re: ZFS melting under postgres..., Ivan Voras, (Sat Dec 15, 12:12 pm)
Re: ZFS melting under postgres..., Dag-Erling Smørgrav, (Sun Dec 16, 10:51 am)
Re: ZFS melting under postgres..., Ivan Voras, (Sun Dec 16, 10:57 am)
Re: ZFS melting under postgres..., Travis Mikalson, (Sat Dec 15, 2:15 pm)
Re: ZFS melting under postgres..., Ivan Voras, (Sat Dec 15, 6:04 pm)
Re: ZFS melting under postgres..., Bernd Walter, (Sat Dec 15, 10:42 pm)
Re: ZFS melting under postgres..., Darren Reed, (Sun Dec 16, 5:40 am)
Re: ZFS melting under postgres..., Doug Rabson, (Fri Dec 14, 9:08 am)
Re: ZFS melting under postgres..., Dag-Erling Smørgrav, (Fri Dec 14, 9:25 am)
Re: ZFS melting under postgres..., Kenneth Vestergaard Schmidt..., (Fri Dec 14, 9:47 am)
Re: ZFS melting under postgres..., Rainer Duffner, (Fri Dec 14, 9:46 am)
Re: ZFS melting under postgres..., Kip Macy, (Wed Dec 12, 11:00 pm)
Re: ZFS melting under postgres..., Peter Schuller, (Fri Dec 14, 2:20 pm)
Re: ZFS melting under postgres..., Ivan Voras, (Fri Dec 14, 3:32 pm)
Re: ZFS melting under postgres..., Ivan Voras, (Thu Dec 13, 1:26 pm)
Re: ZFS melting under postgres..., Benjamin Close, (Thu Dec 13, 12:21 am)