hamadmarri / cacule-cpu-scheduler

The CacULE CPU scheduler is based on interactivity score mechanism. The interactivity score is inspired by the ULE scheduler (FreeBSD scheduler).
264 stars 32 forks source link

possible for sysctl variables calculated dynamically? #39

Closed enihcam closed 3 years ago

enihcam commented 3 years ago

is it possible for sysctl variables to be calculated dynamically based on current context (e.g. cpu load, num of running threads, priority distribution, etc accounting)? For

ptr1337 commented 3 years ago

Benchmark them after applying.

These are settings which i use right now:

 ## Cacule-Settings - these are default values ##
kernel.sched_interactivity_factor=65536

##Network-Settings
net.core.netdev_max_backlog = 16384
net.core.somaxconn = 8192
net.core.rmem_default = 1048576
net.core.rmem_max = 16777216
net.core.wmem_default = 1048576
net.core.wmem_max = 16777216
net.core.optmem_max = 65536
net.ipv4.tcp_rmem = 4096 1048576 2097152
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.udp_rmem_min = 8192
net.ipv4.udp_wmem_min = 8192
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 6
net.ipv4.conf.default.log_martians = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_syncookies = 1
net.core.default_qdisc = cake
net.ipv4.tcp_congestion_control = bbr2
vm.swappiness=1
kernel.nmi_watchdog = 0
hamadmarri commented 3 years ago

is it possible for sysctl variables to be calculated dynamically based on current context (e.g. cpu load, num of running threads, priority distribution, etc accounting)? For

* squeeze the max perf out

* user (non-geek) friendly

Hi @enihcam

Yes, sysctl is just a through gate to pass a user space values to kernel variables (both direction r/w). So yes, we can adjust those variables in the kernel. Do you have any formula to dynamically adjust some sysctl variables?

By the way, the linux kernel/scheduler has already many dynamically changed variables based on many factors.

Thanks