X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fdefaults.h;h=56a7c94490014ae5cda156659dcb8c24a8609c2e;hp=e57e6495fa7509056e308238caed41d6dfd60b54;hb=5c0551f9f5b0d30cf9fb7fb148720b99a5c9b24e;hpb=29555a785f357ea2b898e5cb3fa268e4d85a8fa2 diff --git a/src/common/defaults.h b/src/common/defaults.h index e57e6495f..56a7c9449 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -93,7 +93,20 @@ #define DEFAULT_RELAYD_RUNDIR "%s" #define DEFAULT_RELAYD_PATH DEFAULT_RELAYD_RUNDIR "/relayd" -#define DEFAULT_RELAYD_MINIMAL_FD_CAP 30 +#define DEFAULT_RELAYD_MIN_FD_POOL_SIZE 100 +/* + * The file descriptor pool size needs a reserve buffer to accomodate the + * indirect use of short-lived file descriptors. For instance, glibc will + * create a socket (and thus, use an fd) during calls to gethostname() or + * when querying the user's group. Other calls also probably make use of + * short-lived FDs. + * + * The theoritical maximal reserve corresponds to the number of threads as, + * in the worst case, they could all be making such calls. + * + * This value must be less than DEFAULT_RELAYD_MIN_FD_POOL_SIZE. + */ +#define DEFAULT_RELAYD_FD_POOL_SIZE_RESERVE 10 /* Default lttng run directory */ #define DEFAULT_LTTNG_HOME_ENV_VAR "LTTNG_HOME"