Skip to content

Instantly share code, notes, and snippets.

View abola's full-sized avatar

Abola Lee abola

  • deltaww.com
  • Taipei, Taiwan
View GitHub Profile
@denji
denji / nginx-tuning.md
Last active May 14, 2025 02:43
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@sokratisg
sokratisg / sysctl.conf
Last active January 5, 2024 00:03
Tuned sysctl.conf for use by CentOS/RHEL 6.x or later
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Turn on execshield
# 0 completely disables ExecShield and Address Space Layout Randomization
# 1 enables them ONLY if the application bits for these protections are set to “enable”
# 2 enables them by default, except if the application bits are set to “disable”
# 3 enables them always, whatever the application bits
@apocas
apocas / nodev4centos6.sh
Last active March 6, 2017 16:40
Compiling Nodejs v4 in Centos 6
#!/bin/bash
#Nodejs v4.x needs gcc v4.8, Centos 6 comes with gcc v.4.4.
#devtools-2 comes already bundled with v4.8
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install -y devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
scl enable devtoolset-2 bash
wget https://nodejs.org/dist/latest/node-v4.0.0-linux-x64.tar.gz
tar -zxvf node-v4.0.0-linux-x64.tar.gz