Skip to content

Instantly share code, notes, and snippets.

@mostlygeek
Last active August 29, 2015 14:05
Show Gist options
  • Save mostlygeek/2ebde575b309676355d9 to your computer and use it in GitHub Desktop.
Save mostlygeek/2ebde575b309676355d9 to your computer and use it in GitHub Desktop.
ec2 tcp max it out!
#!/bin/sh
sysctl -w net.ipv4.ip_local_port_range='2000 65000'
sysctl -w net.ipv4.tcp_window_scaling='1';
sysctl -w net.ipv4.tcp_max_syn_backlog='3240000';
sysctl -w net.core.somaxconn='65535';
sysctl -w net.ipv4.tcp_max_tw_buckets='1440000';
sysctl -w net.core.rmem_default='8388608';
sysctl -w net.core.rmem_max='16777216';
sysctl -w net.core.wmem_max='16777216';
sysctl -w net.ipv4.tcp_rmem='4096 87380 16777216';
sysctl -w net.ipv4.tcp_wmem='4096 65536 16777216';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment