Subject: LFS ioflush & fdatasync() optimizations
To: None <firstname.lastname@example.org>
From: Anil Gopinath <email@example.com>
Date: 04/02/2007 23:41:54
I was trying to figure out why, on LFS, ioflush and
fdatasync() are taking more time to complete than
expected and eating up more CPU.
I was able to narrow down the highest hit operation to
this call in lfs_segment.c
lfs_writefile(struct lfs *fs, struct segment *sp,
struct vnode *vp)
error = VOP_PUTPAGES(vp, 0, 0,
PGO_CLEANIT | PGO_ALLPAGES | PGO_LOCKED);
During fdatasync() operation, the most time is spent
in this function when it is being called by:
lfs_segwrite(struct mount *mp, int flags)
error = lfs_writevnodes(fs, mp, sp, VN_DIROP);
1. Is there a way to make sure that
lfs_writevnodes(fs, mp, sp, VN_DIROP); is called less
often during ioflush and fdatasync()?
2. Even when it is called what would be the best way
to make sure that VOP_PUTPAGES(vp, 0, 0, PGO_CLEANIT |
PGO_ALLPAGES | PGO_LOCKED) is called less often?
I am using NetBSD 4.0 on an amd64 machine with disk
write cache turned off. When the write cache is turned
on, the writes complete faster and the inefficiency is
not easily observable.
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.