From aec6d91fb76ee55bb1f200cc4489c89072e656d5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 16 Dec 2013 17:05:51 +0100 Subject: bus: increase the bus socket buffer to 8 MB similar, to the log socket buffers --- src/libsystemd-bus/bus-socket.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libsystemd-bus/bus-socket.c b/src/libsystemd-bus/bus-socket.c index 1365092d73..a7eaf5099d 100644 --- a/src/libsystemd-bus/bus-socket.c +++ b/src/libsystemd-bus/bus-socket.c @@ -38,6 +38,8 @@ #include "bus-internal.h" #include "bus-message.h" +#define SNDBUF_SIZE (8*1024*1024) + static void iovec_advance(struct iovec iov[], unsigned *idx, size_t size) { while (size > 0) { @@ -614,9 +616,9 @@ int bus_socket_setup(sd_bus *b) { enable = !b->bus_client && (b->attach_flags & KDBUS_ATTACH_SECLABEL); setsockopt(b->input_fd, SOL_SOCKET, SO_PASSSEC, &enable, sizeof(enable)); - /* Increase the buffers to a MB */ - fd_inc_rcvbuf(b->input_fd, 1024*1024); - fd_inc_sndbuf(b->output_fd, 1024*1024); + /* Increase the buffers to 8 MB */ + fd_inc_rcvbuf(b->input_fd, SNDBUF_SIZE); + fd_inc_sndbuf(b->output_fd, SNDBUF_SIZE); /* Get the peer for socketpair() sockets */ l = sizeof(b->ucred); -- cgit v1.2.3-54-g00ecf