[PATCH] tuna: modified sysctl settings in example.conf
by Jiri Kastner
Signed-off-by: Jiri Kastner <jkastner(a)redhat.com>
---
etc/tuna/example.conf | 75 ++++++++++++++++++++++++++-----------------------
1 files changed, 40 insertions(+), 35 deletions(-)
diff --git a/etc/tuna/example.conf b/etc/tuna/example.conf
index 7448a4e..7bb293e 100644
--- a/etc/tuna/example.conf
+++ b/etc/tuna/example.conf
@@ -1,54 +1,59 @@
#List of enabled categories
[categories]
-kernel=Kernel scheduler
-vm=VM
-ipv4=Network IPv4
-ipv6=Network IPv6
-net=Network Core
+kernel = Kernel scheduler
+vm = VM
+ipv4 = Network IPv4
+ipv6 = Network IPv6
+net = Network Core
[kernel]
-kernel.sched_latency_ns=1000,50000000,
-kernel.sched_min_granularity_ns=,,
-kernel.sched_nr_migrate=0,128,
-kernel.sched_rt_period_us=,,
-kernel.sched_rt_runtime_us= 1000,2000000,
-kernel.sched_tunable_scaling=0,10,
-kernel.sched_wakeup_granularity_ns=1000,10000000,
-kernel.core_pattern =
+kernel.sched_latency_ns = 1000,50000000,
+kernel.sched_min_granularity_ns = ,,
+kernel.sched_nr_migrate = 0,128,
+kernel.sched_rt_period_us = ,,
+kernel.sched_rt_runtime_us = 1000,2000000,
+kernel.sched_tunable_scaling = 0,10,
+kernel.sched_wakeup_granularity_ns = 1000,20000000,
+kernel.sched_migration_cost_ns = ,,
+kernel.sched_autogroup_enabled = 0,1,
+kernel.core_pattern =
+kernel.sem =
[vm]
-vm.dirty_ratio=0,100,
-vm.dirty_writeback_centisecs=,,
-vm.dirty_expire_centisecs=,,
-vm.laptop_mode=0,5,
-vm.swappiness =0,100,
+vm.dirty_ratio = 0,100,
+vm.dirty_background_ratio = ,,
+vm.dirty_writeback_centisecs = ,,
+vm.dirty_expire_centisecs = ,,
+vm.laptop_mode = 0,5,
+vm.swappiness = 0,100,
+vm.max_map_count = ,,
vm.memory_failure_early_kill = 0,1,0
[net]
-net.core.rmem_default=100000,1000000,
-net.core.rmem_max=100000,1000000,
-net.core.wmem_default=100000,1000000,
-net.core.wmem_max=100000,1000000,
+net.core.rmem_default = 100000,1000000,
+net.core.rmem_max = 100000,1000000,
+net.core.wmem_default = 100000,1000000,
+net.core.wmem_max = 100000,1000000,
[ipv4]
-net.ipv4.tcp_window_scaling=
-net.ipv4.conf.all.forwarding=0,1,
-net.ipv4.conf.all.rp_filter=
-net.ipv4.tcp_congestion_control=
-net.ipv4.tcp_max_syn_backlog=
-net.ipv4.tcp_mem=
-net.ipv4.tcp_slow_start_after_idle=0,1,
-net.ipv4.tcp_window_scaling=0,1,
+net.ipv4.tcp_window_scaling = 0,1,
+net.ipv4.conf.all.forwarding = 0,1,
+net.ipv4.conf.all.rp_filter =
+net.ipv4.tcp_congestion_control =
+net.ipv4.tcp_max_syn_backlog =
+net.ipv4.tcp_mem =
+net.ipv4.tcp_slow_start_after_idle = 0,1,
[ipv6]
-net.ipv6.conf.*.forwarding=0,1,
+net.ipv6.conf.*.forwarding = 0,1,
#special section for gui alias
[guiAlias]
-net.ipv4=ipv4
-net.ipv6=ipv6
-net.core=core
+net.ipv4 = ipv4
+net.ipv6 = ipv6
+net.core = core
#special section for this file description
[fileDescription]
-text=This file contain some features for tunning kernel params.Mainly this is example file for demonstrate tuna new features. Params are set as default or most uses value
+text = This file contain some features for tunning kernel params.Mainly this is example file for demonstrate tuna new features. Params are set as default or most uses value
+
--
1.7.1
9 years, 10 months
[PATCH] CLI: fix traceback when -p is used with unsupported value
by Petr Oros
CLI: fix traceback when -p is used with unsupported value
$ tuna -t 4364 -p fif
Traceback (most recent call last):
File "/usr/bin/tuna", line 647, in <module>
main()
File "/usr/bin/tuna", line 531, in main
tuna.threads_set_priority(thread_list, a, affect_children)
File "/usr/lib/python2.7/site-packages/tuna/tuna.py", line 502, in threads_set_priority
rtprio = int(parms[0])
ValueError: invalid literal for int() with base 10: 'fif'
Signed-off-by: Petr Oros <poros(a)redhat.com>
---
tuna/tuna.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tuna/tuna.py b/tuna/tuna.py
index 0feb521..49c9eab 100755
--- a/tuna/tuna.py
+++ b/tuna/tuna.py
@@ -498,8 +498,11 @@ def threads_set_priority(tids, parm, affect_children = False):
rtprio = int(parms[1])
elif parms[0].upper() in ["FIFO", "RR"]:
rtprio = 1
- else:
+ elif parms[0].isdigit():
rtprio = int(parms[0])
+ else:
+ print "tuna: " + _("\"%s\" is unsupported priority value!") % parms[0]
+ return
for tid in tids:
try:
--
1.8.5.3
9 years, 10 months