Re: [PATCH 1/2] writeback: add dirty_background_time per bdi variable

From: Aneesh Kumar K.V
Date: Wed Sep 12 2012 - 13:02:36 EST

Namjae Jeon <linkinjeon@xxxxxxxxx> writes:

> From: Namjae Jeon <namjae.jeon@xxxxxxxxxxx>
> This patch is based on suggestion by Wu Fengguang:
> kernel has mechanism to do writeback as per dirty_ratio and dirty_background
> ratio. It also maintains per task dirty rate limit to keep balance of
> dirty pages at any given instance by doing bdi bandwidth estimation.
> Kernel also has max_ratio/min_ratio tunables to specify percentage of writecache
> to control per bdi dirty limits and task throttling.
> However, there might be a usecase where user wants a writeback tuning
> parameter to flush dirty data at desired/tuned time interval especially
> at NFS server.
> dirty_background_time provides an interface where user can tune background
> writeback start time using /sys/block/sda/bdi/dirty_background_time
> dirty_background_time is used alongwith average bdi write bandwidth estimation
> to start background writeback.
> One of the use case to demonstrate the patch functionality can be
> on NFS setup:-
> We have a NFS setup with ethernet line of 100Mbps, while the USB
> disk is attached to server, which has a local speed of 25MBps. Server
> and client both are arm target boards.
> Now if we perform a write operation over NFS (client to server), as
> per the network speed, data can travel at max speed of 100Mbps. But
> if we check the default write speed of USB hdd over NFS it comes
> around to 8MB/sec, far below the speed of network.
> Reason being is as per the NFS logic, during write operation, initially
> pages are dirtied on NFS client side, then after reaching the dirty
> threshold/writeback limit (or in case of sync) data is actually sent
> to NFS server (so now again pages are dirtied on server side). This
> will be done in COMMIT call from client to server i.e if 100MB of data
> is dirtied and sent then it will take minimum 100MB/10Mbps ~ 8-9 seconds.

can't the bdi on nfs client side indicate that the commit need to be
send in smaller chunks ?. ie, we need the client to figure out that
the NFS srever is backed by a slow usb disk and accordingly send the
commit request ?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at