# Low SLOG utilization on small disk size



## belon_cfy (Jul 18, 2012)

Hi
I have created a ram disk with 512MB and added it as log device, but most of the write activity will go to disk directly instead of the ram disk. The available space on log device is almost 80% free. 

To fully utilize it as write back cache, I have to increase the size to 10GB and above. 

Is there anyway to tune the zfs to fully utilize ram disk on disk lower than 1GB? Same scenario on SSD with 1GB partition for SLOG too.


----------



## SirDice (Jul 18, 2012)

Don't use a ram disk as write-back cache. If you get a power outage (or a reset as a result of a panic) you will lose data.


----------



## belon_cfy (Jul 18, 2012)

Basically I was thinking to have a ram disk + SSD as LOG device to prevent SSD sudden death, but after few more tests I found that I was wrong. Ram Disk is not necessary because all the incoming data are sitting in RAM and SSD until it flush to the disk, no data will loss when the SSD malfunction. 

Seems having single SSD for LOG can be considered safe on ZFS v28. Unless power outage and SSD fail after power resume happen at the same time.


----------



## SirDice (Jul 18, 2012)

belon_cfy said:
			
		

> Ram Disk is not necessary because all the incoming data are sitting in RAM and SSD until it flush to the disk, no data will loss when the SSD malfunction.


Yes, exactly. ZFS already uses quite a lot of RAM for caching. 



> Seems having single SSD for LOG can be considered safe on ZFS v28. Unless power outage and SSD fail after power resume happen at the same time.


If I'm not mistaken you can mirror them. That'll reduce the risk significantly.


----------

