[haiku] Re: Haiku and SSD's
- From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
- To: haiku@xxxxxxxxxxxxx
- Date: Mon, 7 Aug 2017 06:22:14 +0200
On Sun, Aug 06, 2017 at 10:08:35PM +0200, Giovanni Mugnai wrote:
2017-07-28 1:42 GMT+02:00, Giovanni Mugnai <musical777@xxxxxxxxx>:
What I could expect?
I've bought a Samsung EVO 850 SSD andHaiku is responsive and fast as usual :-)
I partitioned the SSD (250 GiB total) in two 125 GiB partition: the
first one for Win 7 and the second one for Haiku.
1) If I would to run trim on both partition, can I run it from a Linux live
No, because trim needs to know about the filesystem layout.
What trim does is mark some sectors as "unused", so the SSD knows it can
overwrite them with other data. This allows the SSD to improve his
internal management of flash blocks for wear leveling and the like.
The "trim" tool is used to ask the file system which blocks are used or
unused, and tell the SSD about it. So it needs knowledge about the
filesystem internal structures.
I don't think the BFS driver in Linux has trim support, hence it can't
provide that information.
2) Here https://discuss.haiku-os.org/t/haiku-mbr-and-formatting-ssds/3403
I read that the partition on the SSD should be formatted with a 4K
(4096) block size, since DriveSetup offers a default blocksize of 2K
(2048): will it make any difference for the SSD?
Yes. The internal sector size of SSDs is usually 4K or more. So, if the
filesystem has only 2K sectors, when writing a single sector the SSD
will internall do:
- Read a 4K sector to temporary memory
- Replace one half with the new 2K of data
- Write back the 4K sector to disk
Whereas if your filesystem blocks are 4K, all write operation will
always write a full 4K sector, and read-back from the disk is not
The drawback is a slight loss of space on the disk, especially if you
have many files, as each file size will be rounded up to the next 4K
instead of 2K (so a maximal loss of 2Kbytes/file).
Other related posts: