Skip to content

Commit

Permalink
comment out the "kernel.sched_migration_cost_ns"
Browse files Browse the repository at this point in the history
This tests did not show a significant difference before and after turning a process scheduler - https://gitlab.com/postgres-ai/postgresql-consulting/tests-and-benchmarks/-/issues/16

To really reduce the number of context switches:
- try to minimize the number of idle connections to the database;
- use the connections pool in transaction mode.

in addition, this parameter is missing in ubuntu 22.04

Fixed:

failed: [172.31.22.219] (item={'name': 'kernel.sched_migration_cost_ns', 'value': '5000000'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "kernel.sched_migration_cost_ns", "value": "5000000"}, "msg": "Failed to reload sysctl: vm.overcommit_memory = 2\nvm.swappiness = 1\nvm.min_free_kbytes = 102400\nvm.dirty_expire_centisecs = 1000\nvm.dirty_background_bytes = 67108864\nvm.dirty_bytes = 536870912\nvm.zone_reclaim_mode = 0\nkernel.numa_balancing = 0\nsysctl: cannot stat /proc/sys/kernel/sched_migration_cost_ns: No such file or directory\n"}
  • Loading branch information
vitabaks authored Aug 31, 2022
1 parent a911cb5 commit bf3fd84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vars/system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ sysctl_conf:
# - {name: "vm.nr_hugepages", value: "9510"} # example "9510"=18GB
- {name: "vm.zone_reclaim_mode", value: "0"}
- {name: "kernel.numa_balancing", value: "0"}
- {name: "kernel.sched_migration_cost_ns", value: "5000000"}
- {name: "kernel.sched_autogroup_enabled", value: "0"}
- {name: "net.ipv4.ip_nonlocal_bind", value: "1"}
- {name: "net.ipv4.ip_forward", value: "1"}
Expand All @@ -66,6 +65,7 @@ sysctl_conf:
- {name: "net.core.somaxconn", value: "65535"}
- {name: "net.ipv4.tcp_tw_reuse", value: "1"}
# - {name: "net.netfilter.nf_conntrack_max", value: "1048576"}
# - {name: "kernel.sched_migration_cost_ns", value: "5000000"}
# - {name: "", value: ""}
balancers:
- {name: "net.ipv4.ip_nonlocal_bind", value: "1"}
Expand Down

0 comments on commit bf3fd84

Please sign in to comment.