Hi, 

I investigate bit about SSD  and how it works and need to be aligned .

And I  conclude that in the ideal world we need a  general --ebs=xxx switch 
in various linux tools to ensure alignment. Or make calculation by had.. 

On the market there are SSD disks with page size 4 or 8 kb. But there is  
for ssd disk typical property - the EBS - Erase Block Size. If disk operate 
and write to single sector, whole Erase block must be read by driver 
electronic, modified and write back to the drive. 

On the market there are devices with multiple EBS sizes . 128, 256, 512 1024
1534 2048 kib etc 
In my case Samsung 850evo  there are 8k pages and 1536 Erase Block

So first problem with alegment - partition should start on the  Erase block 
bounduary .  So --ebs  switch in partition tools for propper aignment  would
be practical. Or calculate by hand. In my sase 1536 = 3072 512b sectors.

Things get complicate if You use  mdadm raid. Because Raid superblock is 
located on the begining of the raid  device and  does not fill whole rerase 
block, it is practical to set in creation of raid  --offset to real 
filesystem start at next erase block from the begining of raid device so 
underlying filesystem would be aligned as well.  so --ebs=xxx on mdadm would
be practice

And now ext4  so blocksize 4096 . because page size of ssd is 8kb , setting 
stride´wit is a smallest unit on with filesystem operate in one disk to 2  
to fill ssd pagesize is practical. And stripe size set  as ebs/pagesize or 
as whole ebs . and may be it would be useful to use ext4 --offset to edb as 
well. 

this should align partition, raid and filesystem. fix me if I am wrong. 

And  now it is turn for database storage engine. I think try to write on 
erase block size bounduary and  erase block size amount of data may have 
some benefits not with the speed but in lower wear-out of the entire ssd 
disk.. 

  

  



---------- Původní zpráva ----------
Od: Marcin Mańk <marcin.m...@gmail.com>
Komu: PostgreSQL <pgsql-general@postgresql.org>
Datum: 24. 11. 2015 20:07:30
Předmět: [GENERAL] full_page_writes on SSD?

"

I saw this: http://blog.pgaddict.com/posts/postgresql-on-ssd-4kb-or-8kB-
pages(http://blog.pgaddict.com/posts/postgresql-on-ssd-4kb-or-8kB-pages)



It made me wonder: if SSDs have 4kB/8kB sectors, and we'd make the Postgres 
page size equal to the SSD page size, do we still need full_page_writes?




Regards

Marcin Mańk


"

Reply via email to