Re: which ext3 fs type should I use for postgresql

Поиск
Список
Период
Сортировка
От Craig James
Тема Re: which ext3 fs type should I use for postgresql
Дата
Msg-id 482C4F3D.6010808@emolecules.com
обсуждение исходный текст
Ответ на Re: which ext3 fs type should I use for postgresql  (Matthew Wakeling <matthew@flymine.org>)
Ответы Re: which ext3 fs type should I use for postgresql
Список pgsql-performance
Matthew Wakeling wrote:
> Probably of more use are some of the other settings:
>
>  -m reserved-blocks-percentage - this reserves a portion of the filesystem
>     that only root can write to. If root has no need for it, you can kill
>     this by setting it to zero. The default is for 5% of the disc to be
>     wasted.

This is not a good idea.  The 5% is NOT reserved for root's use, but rather is to prevent severe file fragmentation.
Asthe disk gets full, the remaining empty spaces tend to be small spaces scattered all over the disk, meaning that even
formodest-sized files, the kernel can't allocate contiguous disk blocks.  If you reduce this restriction to 0%, you are
virtuallyguaranteed poor performance when you fill up your disk, since those files that are allocated last will be
massivelyfragmented. 

Worse, the fragmented files that you create remain fragmented even if you clean up to get back below the 95% mark.  If
Postgreshappened to insert a lot of data on a 99% full file system, those blocks could be spread all over the place,
andthey'd stay that way forever, even after you cleared some space. 

Craig

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: I/O on select count(*)
Следующее
От: Guillaume Cottenceau
Дата:
Сообщение: Re: which ext3 fs type should I use for postgresql