tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: high load, no bottleneck



> In this setup, vfs.wapbl.flush_disk_cache=1 still get high loads, on both 6.0
> and -current.
> I assume there must be something bad with WAPBL/RAIDframe
Everything up to and including 6.0 is broken in this respect.
Thanks to hannken@, 6.1 does align journal flushes.

How fast can you write to the file system in question?
Does your NFS load include a large amount of small syncrounous (filesync) write 
operations?

The attached patch (by hannken@) and vfs.wapbl.verbose_commit=2 will tell you 
how long the journal flushes take.
Don't activate (i.e. set verbose_commit) for longer than a few seconds without 
monitoring syslog size.
Index: vfs_wapbl.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_wapbl.c,v
retrieving revision 1.51.2.2
diff -u -r1.51.2.2 vfs_wapbl.c
--- vfs_wapbl.c 2 Jan 2013 23:23:15 -0000       1.51.2.2
+++ vfs_wapbl.c 18 Sep 2013 16:19:40 -0000
@@ -1456,6 +1456,8 @@
        size_t flushsize;
        size_t reserved;
        int error = 0;
+struct bintime start_time;
+flushsize = 0;
 
        /*
         * Do a quick check to see if a full flush can be skipped
@@ -1479,6 +1481,7 @@
         * if we want to call flush from inside a transaction
         */
        rw_enter(&wl->wl_rwlock, RW_WRITER);
+bintime(&start_time);
        wl->wl_flush(wl->wl_mount, wl->wl_deallocblks, wl->wl_dealloclens,
            wl->wl_dealloccnt);
 
@@ -1712,6 +1715,24 @@
        }
 #endif
 
+if (wapbl_verbose_commit)
+{
+       struct bintime d;
+       struct timespec ts;
+       int kbsec, msec;
+
+       bintime(&d);
+       bintime_sub(&d, &start_time);
+       bintime2timespec(&d, &ts);
+       msec = ts.tv_nsec/1000000+1000*ts.tv_sec;
+       if (msec == 0)
+               kbsec = 0;
+       else
+               kbsec = flushsize / msec;
+       printf("%s %zu bytes %d.%03d secs %d.%03d MB/sec\n",
+           wl->wl_mount->mnt_stat.f_mntonname, flushsize,
+           msec/1000, msec%1000, kbsec/1000, kbsec%1000);
+}
        rw_exit(&wl->wl_rwlock);
        return error;
 }


Home | Main Index | Thread Index | Old Index