FYI -- the change was merged into the mainstream kernel today...

----- Forwarded message from [email protected] -----

Date: Tue, 30 Apr 2013 15:28:28 -0700
From: [email protected]
To: [email protected]
Cc: [email protected], [email protected], [email protected], 
[email protected]
Subject: [patch 081/109] nbd: increase default and max request sizes

From: Michal Belczyk <[email protected]>
Subject: nbd: increase default and max request sizes

Raise the default max request size for nbd to 128KB (from 127KB) to get it
4KB aligned.  This patch also allows the max request size to be increased
(via /sys/block/nbd<x>/queue/max_sectors_kb) to 32MB.

The patch makes nbd network traffic more efficient by:
- reducing request fragmentation (4KB alignment)
- reducing the number of requests (fewer round trips, less network overhead)

Especially in high latency networks, larger request size can make a dramatic

Signed-off-by: Paul Clements <[email protected]>
Signed-off-by: Michal Belczyk <[email protected]>
Cc: Jens Axboe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 drivers/block/nbd.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN drivers/block/nbd.c~nbd-increase-default-and-max-request-sizes 
drivers/block/nbd.c
--- a/drivers/block/nbd.c~nbd-increase-default-and-max-request-sizes
+++ a/drivers/block/nbd.c
@@ -856,6 +856,8 @@ static int __init nbd_init(void)
                disk->queue->limits.discard_granularity = 512;
                disk->queue->limits.max_discard_sectors = UINT_MAX;
                disk->queue->limits.discard_zeroes_data = 0;
+               blk_queue_max_hw_sectors(disk->queue, 65536);
+               disk->queue->limits.max_sectors = 256;
        }
 
        if (register_blkdev(NBD_MAJOR, "nbd")) {
_


----- End forwarded message -----

-- 
Michal Belczyk Sr.

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to