Skip to content

Instantly share code, notes, and snippets.

@combatpoodle
Created June 29, 2013 05:18
Show Gist options
  • Save combatpoodle/5889922 to your computer and use it in GitHub Desktop.
Save combatpoodle/5889922 to your computer and use it in GitHub Desktop.
Normalize PHP-FPM CPU affinity Assumes 8 processors, #0 assigned to kernel+nginx
* * * * * root /usr/local/bin/normalize_php_fpm_cpu_affinity.sh
#!/bin/bash
for i in `ps auxw | grep php-fpm | awk ' { print $2; } '`; do echo $i; taskset -pc 1-7 $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment