Discussion:
tuning a zfs-mounted /var
tech-lists
2021-05-22 18:28:16 UTC
Permalink
Hi,

What options could one pass to zfs to speed it up to characteristics
favourable to what's usually in /var ? Like lots of fast writes, lots of
files smaller than what's on /usr, lots of file creation and deletion
but also quite a few files that might become large, like what's in
/var/log, things like that.

thanks,
--
J.
Michael Gmelin
2021-05-22 19:13:52 UTC
Permalink
Post by tech-lists
Hi,
What options could one pass to zfs to speed it up to characteristics
favourable to what's usually in /var ? Like lots of fast writes, lots of
files smaller than what's on /usr, lots of file creation and deletion
but also quite a few files that might become large, like what's in
/var/log, things like that.
Make sure your pool (or at least the /var file system) has compression=lz4 and that atime is off, beyond that I wouldn’t bother to try to optimize manually there, unless you run a database like MySQL in /var/db/…, in which case setting a fixed record size might make sense.

Best
Michael
Post by tech-lists
thanks,
--
J.
tech-lists
2021-05-23 00:32:23 UTC
Permalink
Make sure your pool (or at least the /var file system) has compression=lz4 and that atime is off, beyond that I wouldn’t bother to try to optimize manually there, unless you run a database like MySQL in /var/db/
, in which case setting a fixed record size might make sense.
excellent, this is the kind of thing i was lookling for

thanks,
--
J.
John-Mark Gurney
2021-05-23 18:59:16 UTC
Permalink
???Hi,
What options could one pass to zfs to speed it up to characteristics
favourable to what's usually in /var ? Like lots of fast writes, lots of
files smaller than what's on /usr, lots of file creation and deletion
but also quite a few files that might become large, like what's in
/var/log, things like that.
Make sure your pool (or at least the /var file system) has compression=lz4 and that atime is off, beyond that I wouldn???t bother to try to optimize manually there, unless you run a database like MySQL in /var/db/???, in which case setting a fixed record size might make sense.
And if you're running a db in /var, you should just create a new dataset
for the database instead of reuse /var's dataset, that way the fixed
record size does not cause problems for the rest of /var...
--
John-Mark Gurney Voice: +1 415 225 5579

"All that I will do, has been done, All that I have, has not."
Loading...