X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fdefaults.h;h=2dff3908768ab24157dfd94cad012696520bcaa5;hb=47bd3dfaa9aec8fff131d7afd8d4c76a182aeccc;hp=71a1194217ffa0f0795f49e94614d4fcb7370fa1;hpb=a8a54a6fe7700df804a62097b628f53d1e3112a2;p=deliverable%2Flttng-tools.git diff --git a/src/common/defaults.h b/src/common/defaults.h index 71a119421..2dff39087 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -90,7 +90,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"