1 |
On 05/07/2013 10:49 AM, Stroller wrote: |
2 |
> |
3 |
> On 6 May 2013, at 21:07, Randolph Maaßen wrote: |
4 |
> |
5 |
>> - When a file is deleted the file system marks the block device |
6 |
>> sectors as free and sends the TRIM command to the SSD and the SSD |
7 |
>> really frees the underlying cell / breaks the cell - section allocation. |
8 |
> |
9 |
> So if I'm writing a new filesystem, I have to make sure it make the TRIM |
10 |
> systemcall, otherwise it'll break with SSDs? |
11 |
|
12 |
Not exactly. What the TRIM system call really does is give the drive |
13 |
hints about where the boundaries of your data really are, so that it |
14 |
knows what parts of the disk's space it can take more liberties with. |
15 |
|
16 |
As a rough analogy, imagine you're helping a friend fill a bunch of |
17 |
crates. Perhaps the friend told you he doesn't really care about some of |
18 |
the stuff, and you realize you can get stuff done more effectively by |
19 |
dumping a crate full of junk into the trash and putting other stuff |
20 |
(stuff he cares about) into it. |
21 |
|
22 |
This helps improve disk lifetime and efficiency, but it's not strictly |
23 |
necessary for functionality; nobody's truly harmed by having a crate of |
24 |
junk hanging around, since the owner can always replace stuff in it at |
25 |
their leisure, anyway. It's just more efficient if the crate's empty |
26 |
when he goes to put stuff in it. |