Linux Sysctl Tuner
Calculate Linux kernel and network buffer settings locally in your browser
About
Calculate BDP-aware TCP buffers plus connection queues, file handles, inotify watches, and swappiness locally in your browser.
Examples
Gigabit link at 100 ms RTT
calculateSysctl({ ramGb: 16, rttMs: 100, bandwidthMbps: 1000, profile: "web-server" })bdpBytes: 12500000, maxBufferBytes: 16666667, tcp_rmem: 4096 87380 16666667BDP is 1e9 × 0.1 / 8 = 12.5 MB; the 4/3 headroom ceils to 16,666,667 as the buffer ceiling.
Database vs web server
calculateSysctl({ ramGb: 8, rttMs: 20, bandwidthMbps: 100, profile: "database" })vm.swappiness = 1, somaxconn = 2048The database profile minimizes swap pressure (1 vs 10) and halves the accept queue versus web-server.
About this tool
Linux Sysctl Tuner derives kernel network and memory settings with calculateSysctl({ ramGb, rttMs, bandwidthMbps, profile }): the bandwidth-delay product (bandwidth bits/s × RTT seconds / 8) gets a 4/3 headroom factor via Math.ceil to form maxBufferBytes, floored at 4 MiB, which then feeds net.core.rmem_max/wmem_max and the tcp_rmem/tcp_wmem maximum triplets.
Profiles differentiate queueing and swap policy: web-server (somaxconn 4096, syn backlog 8192, swappiness 10), database (2048/4096/1), file-server (1024/2048/20), and k8s-node (4096/8192/0). RAM scales fs.file-max (262,144 per GB, floor 131,072) and fs.inotify.max_user_watches (8,192 per GB, floor 65,536), and every parameter ships with an explanation plus a ready-to-paste key = value config.
Inputs validate strictly: non-finite or non-positive RAM, RTT, or bandwidth throws, as does an unknown profile. A 1000 Mbps × 100 ms link yields exactly bdpBytes 12,500,000 and maxBufferBytes 16,666,667 — all computation is local, so host specs never leave the browser.
How to use this tool
Enter link and host specs
Provide RAM in GB, RTT in ms, and bandwidth in Mbps — all three must be positive numbers or the calculation throws.
Pick the workload profile
Choose web-server, database, file-server, or k8s-node to set somaxconn, syn backlog, and swappiness policy.
Apply the generated config
Copy the key = value lines into /etc/sysctl.d/99-tuning.conf, run sysctl --system, and verify with sysctl net.core.rmem_max.
Use cases
Sizing high-latency transfer hosts
Raise TCP buffer ceilings so long-fat links (cloud regions, inter-DC replication) can fill the pipe.
Tuning database nodes against swap
Pin swappiness to 1 so database pages stay resident while file cache absorbs the pressure.
Preparing Kubernetes nodes
Use the k8s-node profile (swappiness 0, deep queues) as a baseline for burst-heavy pod traffic.
Common mistakes
Mistake:Passing zero bandwidth or RTT and expecting a fallback.
Fix:Zero or negative inputs throw must be a positive number — validate form fields before calling, since there is no clamping.
Mistake:Applying the config without reloading sysctl.
Fix:Writing the file is not enough — run sysctl --system (or sysctl -p) and confirm each key took effect.
Frequently asked questions
What does this tool do?
It derives sysctl settings with calculateSysctl: BDP (bandwidth × RTT / 8) with 4/3 headroom sets rmem/wmem ceilings and tcp_rmem/tcp_wmem maxima, the profile sets somaxconn/syn-backlog/swappiness, and RAM scales file-max and inotify watches — emitted as key = value lines with explanations.
What is the reference calculation, and how do profiles differ?
1000 Mbps × 100 ms gives bdpBytes 12,500,000 and maxBufferBytes 16,666,667. web-server uses swappiness 10 with somaxconn 4096, database uses 1 with 2048, file-server 20 with 1024, and k8s-node 0 with 4096.
Is my host data uploaded or stored?
No. All arithmetic is local — RAM, RTT, and bandwidth never leave your browser.
Which inputs throw?
Non-finite or non-positive RAM, RTT, or bandwidth (including 0) throws must be a positive number, and an unknown profile throws Unknown profile. There is no clamping fallback.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
AI Function Calling Schema Generator
Generate function calling JSON schemas from TypeScript interfaces
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML