[zfs-fuse] ZIL and L2ARC cache questions

388 views
Skip to first unread message

devsk

unread,
Apr 18, 2010, 9:17:04 PM4/18/10
to zfs-fuse
Hi,

So, I setup a flash drive for ZIL (zpool add <pool> log <dev>) and
another for L2ARC (zpool add <pool> cache <dev>). I then set the
secondarycache to be used for metadata only. The cache seems to work
fine but log is not used at all ("zpool iostat -v <pool> 2" doesn't
show any IO). So, I have couple of questions:

1. Why is the ZIL not getting used? I see no writes to it. I was
hoping to get my small random writes to go up.
2. Why does the L2ARC get flushed on a restart? So much write for
nothing? It wrote about 8Gigs on that SSD and then a restart later it
shows 0 size in iostat...:-( Why does it treat as RAM when it knows
its non-volatile?

Are these features not implemented correctly in zfs-fuse or is it
expected behavior for ZFS?

Thanks a bunch!
-devsk

--
To post to this group, send email to zfs-...@googlegroups.com
To visit our Web site, click on http://zfs-fuse.net/

Subscription settings: http://groups.google.com/group/zfs-fuse/subscribe?hl=en

devsk

unread,
Apr 20, 2010, 12:20:35 AM4/20/10
to zfs-fuse
Does nobody know the answer to these two questions?

-devsk
> To visit our Web site, click onhttp://zfs-fuse.net/

sgheeren

unread,
Apr 20, 2010, 2:54:46 AM4/20/10
to zfs-...@googlegroups.com
devsk wrote:
Does nobody know the answer to these two questions?
  
Not from the top of my head, no. Sorry

-devsk


On Apr 18, 6:17 pm, devsk <dev...@gmail.com> wrote:
  
Hi,

So, I setup a flash drive for ZIL (zpool add <pool> log <dev>) and
another for L2ARC (zpool add <pool> cache <dev>). I then set the
secondarycache to be used for metadata only. The cache seems to work
fine but log is not used at all ("zpool iostat -v <pool> 2" doesn't
show any IO). So, I have couple of questions:
    
I have run this kind of setup when optimizing my SSD system. One thing: do not blindly trust zpool iostat to be 100% accurate (both on Linux and Solaris). I regularly use vmstat, iostat an the handy 'iotop -boP' to get detailed info. If you care you can use some form of devicemapping (lvm2, my favourite) to get separate block device major/minors so these tools will show the different device nodes even if they actually use the same physical devices.

1. Why is the ZIL not getting used? I see no writes to it. I was
hoping to get my small random writes to go up.
    
The small actions should go on the cache device really.  The ZIL activities might not actually show up in 'zpool iostat' like I mentioned above.

2. Why does the L2ARC get flushed on a restart? So much write for
nothing? It wrote about 8Gigs on that SSD and then a restart later it
shows 0 size in iostat...:-( Why does it treat as RAM when it knows
its non-volatile?
    
I used to recall the answer to this one. It has been answered a number of times if my memory serves, but not on this list. Refer to zfs-discuss, zfs-code or some other upstream resources.
Are these features not implemented correctly in zfs-fuse or is it
expected behavior for ZFS?
    
Going out on a limb, I wouldn't be absolutely shocked to find out that zpool's iostat works /(somewhat) differently/ on linux. On the other hand, since the zfs-fuse essentially replicates all of the ZFS kernel component as a fuse module, it should normally work 1-on-1 on linux.
Thanks a bunch!
-devsk

--
To post to this group, send email to zfs-...@googlegroups.com
To visit our Web site, click onhttp://zfs-fuse.net/

Subscription settings:http://groups.google.com/group/zfs-fuse/subscribe?hl=en
    
  

Jonathan Schmidt

unread,
Apr 22, 2010, 1:04:41 AM4/22/10
to zfs-...@googlegroups.com
On 2010-04-18 6:17 PM, devsk wrote:
> Hi,
>
> So, I setup a flash drive for ZIL (zpool add<pool> log<dev>) and
> another for L2ARC (zpool add<pool> cache<dev>). I then set the
> secondarycache to be used for metadata only. The cache seems to work
> fine but log is not used at all ("zpool iostat -v<pool> 2" doesn't
> show any IO). So, I have couple of questions:
>
> 1. Why is the ZIL not getting used? I see no writes to it. I was
> hoping to get my small random writes to go up.
>

ZIL is only used for synchronous (O_SYNC) writes.

> 2. Why does the L2ARC get flushed on a restart? So much write for
> nothing? It wrote about 8Gigs on that SSD and then a restart later it
> shows 0 size in iostat...:-( Why does it treat as RAM when it knows
> its non-volatile?
>

ZFS upstream (Solaris) has this same behaviour, so nothing is wrong with
zfs-fuse. There is an RFE out on it -- feel free to write the code and
submit a patch if you like :)
Reply all
Reply to author
Forward
0 new messages