jonschipp / ISLET

Isolated, Scalable, & Lightweight Environment for Training
Other
111 stars 18 forks source link

Autodetect numer of cpu's #80

Open jonschipp opened 8 years ago

jonschipp commented 8 years ago

Need a portable way to detect number of cpu's to automatically configure cpu-set. Tested getconf _NPROCESSORS_CONF on Linux and OSX. Without the underscore getconf NPROCESSORS_CONF returns number of processors on IllumnOS

jonschipp commented 8 years ago

The only use case I can think of right now is to allocate all cores for containers except 0.. automatically on multicore systems to prevent the system from becoming fully unresponsive should an issue arise