Skip to content

Instantly share code, notes, and snippets.

View twobombs's full-sized avatar
🌊
time draws the fractal of causality

Aryan Blaauw twobombs

🌊
time draws the fractal of causality
View GitHub Profile
@twobombs
twobombs / linux-oom-killer-fixes.md
Created October 30, 2022 14:11 — forked from t27/linux-oom-killer-fixes.md
Dealing with the Linux OOM Killer

Dealing with the Linux OOM Killer at the program level

Do this in cases when you dont want to change the os-level settings, but only want to disable the OOM killer for a single process. This is useful when youre on a shared machine/server.

The OOM killer uses the process level metric called oom_score_adj to decide if/when to kill a process. This file is present in /proc/$pid/oom_score_adj. The oom_score_adj can vary from -1000 to 1000, by default it is 0.

You can add a large negative score to this file to reduce the probability of your process getting picked and terminated by OOM killer. When you set it to -1000, it can use 100% memory and still avoid getting terminated by OOM killer.

!dream "a dendritic monster emerging from the ocean, sea waves, vray, 55mm" -n 5
!dream "a wormy dendritic monster emerging from the ocean, sea waves, vray, 55mm" -n 5
!dream "furry friendly monster, photorealistic, colored, unreal engine, vray, 55mm" -n 9
@twobombs
twobombs / nginx-tls.conf
Created February 16, 2018 08:55 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables SPDY, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are omitted here.
#
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io
#