From b44c85528c7449e9db4610e325fd9550f6ea1dd4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 8 Feb 2012 10:25:59 +0100 Subject: [PATCH] write_graphite plugin: Decrese buffer size. The larger the buffer, the longer you need to wait for the data to be written to Carbon. The new buffer size assumes an MTU of 1500 bytes (Ethernet payload) and keeps margins for IPv6 and TCP (with timestamps). This should decrease the number of packets needed (because data is now cleanly aligned to the packet size) and decrease the overall time spent buffered. Change-Id: I73021608f1ff0f22f9e73cd62b7fb5ea79421546 --- src/write_graphite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/write_graphite.c b/src/write_graphite.c index 2e4af22d..7a0bb12d 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -66,8 +66,9 @@ # define WG_DEFAULT_ESCAPE '_' #endif +/* Ethernet - (IPv6 + TCP) = 1500 - (40 + 32) = 1428 */ #ifndef WG_SEND_BUF_SIZE -# define WG_SEND_BUF_SIZE 4096 +# define WG_SEND_BUF_SIZE 1428 #endif /* -- 2.11.0