2011-06-29 16:33, Sašo Kiselkov пишет:
On 06/27/2011 11:59 AM, Jim Klimov wrote:
I'd like to ask about whether there is a method to enforce a
certain txg
commit frequency on ZFS.
Well, there is a timer frequency based on TXG age (i.e 5 sec
by default now), in /etc/system like this:
set zfs:zfs_txg_synctime = 5
When trying to read the value through mdb I get:
# echo zfs_txg_synctime::print | mdb -k
mdb: failed to dereference symbol: unknown symbol name
Is this some new addition in S11E?
No, it is in OpenSolaris (SXCE in my case) and Solaris 10, like, forever.
My sxce 117, sol10u6 x86 and sol10u8 sparc boxes all returned 0x5:
# echo zfs_txg_synctime::print | mdb -k
0x5
So I am puzzled why you don't have that value...
Please also see if you have its possible alternate names though, i.e.:
set zfs:zfs_txg_synctime = 5
set zfs:zfs_txg_timeout = 5
set zfs:zfs_txg_synctime_ms = 5000
Also there is a buffer-size limit, like this (384Mb):
set zfs:zfs_write_limit_override = 0x18000000
or on command-line like this:
# echo zfs_write_limit_override/W0t402653184 | mdb -kw
Currently my value for this is 0. How should I set it? I'm writing
~15MB/s and would like txg flushes to occur at most once every 10
seconds. Should I set it to 150MB then?
I guess so, if you know your flows so precisely.
AFAIK the default zero value disables a specific buffer size
limit and instead uses ZFS's autocalculated size limit (some
percentage of RAM/ARC size), or the TXG sync time.
In our case we estimated an acceptable time-of-writing of the
buffered data which does not give substantial service stalls
even if the system is otherwise unresponsive during a cache
flush to disk. Apparently, smaller values can lead to excessive
mechanical IOs and fragmentation, so there is some balance
to find and strike...
We had similar spikes with big writes to a Thumper with SXCE in the pre-90's
builds, when the system would stall for seconds while flushing a 30-second TXG
full of data. Adding a reasonable megabyte limit solved the unresponsiveness
problem for us, by making these flush-writes rather small and quick.
I need to do the opposite - I don't need to shorten the interval of
writes, I need to increase it. Can I do that using zfs_write_limit_override?
I am not sure about that - if the TXG sync timer strikes before
the buffer size is overflowed, flushes should occur. Alternatively,
if you buffered too many writes too quickly (before the TXG sync
timer chimes in) - flushes should occur.
--
+============================================================+
| |
| Климов Евгений, Jim Klimov |
| технический директор CTO |
| ЗАО "ЦОС и ВТ" JSC COS&HT |
| |
| +7-903-7705859 (cellular) mailto:jimkli...@cos.ru |
| CC:ad...@cos.ru,jimkli...@mail.ru |
+============================================================+
| () ascii ribbon campaign - against html mail |
| /\ - against microsoft attachments |
+============================================================+
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss