summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-30 11:27:29 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-31 19:09:20 +0100
commita47806fafaec9a52a80e1795ad880b9b5008c4b8 (patch)
tree8f9c02f746975563ff4050f0b3dfffad0cbc76d1 /src/core
parentcacea34bd161c31491349387db913b30508b6f11 (diff)
sd-daemon: increase sd_notify() socket buffer size
Let's make sure we don't start blocking on sd_notify() earlier than necessary, let's bump the socket buffer sizes to 8M. We already do something similar for our logging socket buffers, hence apply a similar bump here.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 2039dafea1..b13663e702 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -86,6 +86,8 @@
#include "virt.h"
#include "watchdog.h"
+#define NOTIFY_RCVBUF_SIZE (8*1024*1024)
+
/* Initial delay and the interval for printing status messages about running jobs */
#define JOBS_IN_PROGRESS_WAIT_USEC (5*USEC_PER_SEC)
#define JOBS_IN_PROGRESS_PERIOD_USEC (USEC_PER_SEC / 3)
@@ -689,6 +691,8 @@ static int manager_setup_notify(Manager *m) {
if (fd < 0)
return log_error_errno(errno, "Failed to allocate notification socket: %m");
+ fd_inc_rcvbuf(fd, NOTIFY_RCVBUF_SIZE);
+
if (m->running_as == MANAGER_SYSTEM)
m->notify_socket = strdup("/run/systemd/notify");
else {