sasha2002 Blog's

Just another blog from admin's

Archive for the ‘Linux’ Category

Custom Nginx Maintenance Page —

server { listen 80; server_name mysite.com; root /var/www/mysite.com/; location / { if (-f $document_root/maintenance.html) { return 503; } … # the rest of your config goes here } error_page 503 @maintenance; location @maintenance { rewrite ^(.*)$ /maintenance.html break; } } Now whenever you need to take your site offline, simply create the file maintenance.html in […]

How To Set CPU Scaling Governor to Max Performance (scaling_governor) —

# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor To set the scaling_governor to “performance” mode for each CPU, run: # echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor # echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor # echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor # echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor … To verify configuration, run: # cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governorperformanceperformanceperformanceperformance … To view and compare current frequency to the min and max scaling, […]