aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/kernel/tasks
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-12-10 21:17:16 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-12-12 22:04:27 +0100
commit7c1f7039170a25f192d87235476179f7cfe01a85 (patch)
treefc8e77b7176fa730b30b20081e76f2527371e9a3 /roles/_workstation/kernel/tasks
parent21fc0867dc42128434e5c46ca684d9a966184b8a (diff)
downloadrules-7c1f7039170a25f192d87235476179f7cfe01a85.tar.gz
chore: explode workstation role in subroles
Diffstat (limited to 'roles/_workstation/kernel/tasks')
-rw-r--r--roles/_workstation/kernel/tasks/main.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/roles/_workstation/kernel/tasks/main.yml b/roles/_workstation/kernel/tasks/main.yml
new file mode 100644
index 0000000..3dc1e60
--- /dev/null
+++ b/roles/_workstation/kernel/tasks/main.yml
@@ -0,0 +1,34 @@
+---
+
+- name: create sysctl configuration file
+ ansible.builtin.file:
+ path: "{{ kernel_sysctl_configuration_file }}"
+ owner: 0
+ group: 0
+ mode: 0644
+
+- name: apply memory optimizations
+ ansible.builtin.blockinfile:
+ path: "{{ kernel_sysctl_configuration_file }}"
+ block: |
+ kern.shminfo.shmall=3145728
+ kern.shminfo.shmmax=1073741823
+ kern.shminfo.shmmni=1024
+ kern.shminfo.shmseg=1024
+ kern.seminfo.semmns=4096
+ kern.seminfo.semmni=1024
+ marker_begin: "memory - BEGIN"
+ marker_end: "memory - END"
+
+- name: apply process optimizations
+ ansible.builtin.blockinfile:
+ path: "{{ kernel_sysctl_configuration_file }}"
+ block: |
+ kern.maxfiles=102400
+ kern.maxproc=32768
+ kern.maxfiles=65535
+ kern.bufcachepercent=90
+ kern.maxvnodes=262144
+ kern.somaxconn=2048
+ marker_begin: "process - BEGIN"
+ marker_end: "process - END"
remember that computers suck.