[SOLVED] ZFS Cache and Logsize - logs only 8MB, is this normal?

fireon

Distinguished Member
Oct 25, 2010
4,525
491
153
Austria/Graz
deepdoc.at
Hello,

i use here pve-manager/4.2-2/725d76f0 (running kernel: 4.4.8-1-pve) with an extra SSD for ZFS Log and Cache.
Code:
logs  -  -  -  -  -  - 
 ata-SAMSUNG_MZ7KM240HAGR-00005_XXXXXXXXXX-part1  1.46M  49.7G  0  3  2  209K 
cache  -  -  -  -  -  - 
 ata-SAMSUNG_MZ7KM240HAGR-00005_XXXXXXXXXX-part2  169G  4.18G  2  11  18.6K  745K
So you can see the log es not very pig. Is this normal...? So it will be better to repart the SSD with only 1GB Log and the rest of is cache?

Thanks!
 
I experienced that too. First, the zlog is only used for sync writes and secondely it is flushed every 5 seconds, so you normally do not need a lot of space for that. I'd use mirrored disks for logs.

A good estimate is to size the log to have a maximum of 5 seconds of full sync-write throughput. According to http://www.sebastien-han.fr/blog/20...-if-your-ssd-is-suitable-as-a-journal-device/ your SSD seems to max out at about 125 MB/sec which yields 625 MB. So 1 GB should be sufficient.
 
Hello, thanks for the info. I thought so... :) I'am right when i say i can delete and recreate the cache/log SSD at any time?
 
I'm not completely sure, because I did it only once in a test environment and i do not recall if I did a pool destroy or only removed the cache/zil and then destroyed the pool. I'd try it in a virtualized environment with ordinary devices posing as ssd.
 
i can delete and recreate the cache/log SSD at any time
Yes, see zpool remove. It can be done while the pool is online. Removing cache is a no-brainer while removing log implicates a flush to pool first but this is handled by the zpool remove command.
 
ok, thank you, yes than i will do that and recreate it with better sizes.