X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fdefaults.h;h=2dff3908768ab24157dfd94cad012696520bcaa5;hb=47bd3dfaa9aec8fff131d7afd8d4c76a182aeccc;hp=5f4d4d0b936a755bd0d21b046e697f072d68ce62;hpb=d893a65a0e39eb3bf06c9088ce8cb2c8dc36df98;p=deliverable%2Flttng-tools.git diff --git a/src/common/defaults.h b/src/common/defaults.h index 5f4d4d0b9..2dff39087 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -90,6 +90,21 @@ #define DEFAULT_RELAYD_RUNDIR "%s" #define DEFAULT_RELAYD_PATH DEFAULT_RELAYD_RUNDIR "/relayd" +#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" #define DEFAULT_LTTNG_FALLBACK_HOME_ENV_VAR "HOME"