1 |
On Thursday, September 01, 2016 08:41:39 AM Michael Mol wrote: |
2 |
> On Wednesday, August 31, 2016 11:45:15 PM Alan McKinnon wrote: |
3 |
> > On 31/08/2016 17:25, Grant wrote: |
4 |
> > >> Which NTFS system are you using? |
5 |
> > >> |
6 |
> > >> ntfs kernel module? It's quite dodgy and unsafe with writes |
7 |
> > >> ntfs-ng on fuse? I find that one quite solid |
8 |
> > > |
9 |
> > > I'm using ntfs-ng as opposed to the kernel option(s). |
10 |
> > |
11 |
> > I'm offering 10 to 1 odds that your problems came from ... one that you |
12 |
> > yanked too soon |
13 |
> |
14 |
> (pardon the in-line snip, while I get on my soap box) |
15 |
> |
16 |
> The likelihood of this happening can be greatly reduced by setting |
17 |
> vm.dirty_bytes to something like 2097125 and vm.dirty_background_bytes to |
18 |
> something like 1048576. This prevents the kernel from queuing up as much |
19 |
> data for sending to disk. The application doing the copy or write will |
20 |
> normally report "complete" long before writes to slow media are |
21 |
> actually...complete. Setting vm.dirty_bytes to something low prevents the |
22 |
> kernel's backlog of data from getting so long. |
23 |
> |
24 |
> vm.dirty_bytes has another, closely-related setting, vm.dirty_bytes_ratio. |
25 |
> vm.dirty_bytes_ratio is a percentage of RAM that is used for dirty bytes. If |
26 |
> vm.dirty_bytes_ratio is set, vm.dirty_bytes will read 0. If vm.dirty_bytes |
27 |
> is set, vm.dirty_bytes_ratio will read 0. |
28 |
> |
29 |
> The default is for vm.dirty_bytes_ratio to be 20, which means up to 20% of |
30 |
> your memory can find itself used as a write buffer for data on its way to a |
31 |
> filesystem. On a system with only 2GiB of RAM, that's 409MiB of data that |
32 |
> the kernel may still be waiting to push through the filesystem layer! If |
33 |
> you're writing to, say, a class 10 SDHC card, the data may not be at rest |
34 |
> for another 40s after the application reports the copy operation is |
35 |
> complete! |
36 |
> |
37 |
> If you've got a system with 8GiB of memory, multiply all that by four. |
38 |
> |
39 |
> The defaults for vm.dirty_bytes and vm.dirty_background_bytes are, IMO, |
40 |
> badly broken and an insidious source of problems for both regular Linux |
41 |
> users and system administrators. |
42 |
|
43 |
I would prefer to be able to have different settings per disk. |
44 |
Swappable drives like USB, I would put small numbers. |
45 |
But for built-in drives, I'd prefer to keep default values or tuned to the |
46 |
actual drive. |
47 |
|
48 |
-- |
49 |
Joost |