Add support for the memsw limits that limit memory+swap
[compctl.git] / common.h
blob402be1e4139516671351556ce909031a91500a85
1 /* Definitions common for the client and daemon,
2 * and runtime configuration definitions. */
4 #ifndef COMMON__H
5 #define COMMON__H
7 /* Compile-time configuration area. */
9 /* Default memory split policy. Memory is split between
10 * user and computations by split_ratio, but so that neither
11 * has reserved less than minfree (in case of too little memory,
12 * user takes precedence) and user does not have reserved more
13 * than maxfree. */
14 #define static_minfree (512*1048576UL)
15 #define static_maxfree (2048*1048576UL)
16 #define split_ratio 0.5
18 /* Default nice value for processes started using compctl --run. */
19 #define COMPNICE 12
21 /* Comment out if swap memory resource accounting is disabled
22 * and only RAM memory should be limited. */
23 #define SWAP_LIMIT 1
26 /* Other common definitions. */
27 /* See README for the high-level protocol description. */
29 #define SOCKFILE "/var/run/compctl.sock"
31 /* CGroup and hierarchy names. */
32 static const char chier[] = "memory";
33 static const char cgroup[] = "comp";
35 #endif