Difference between revisions of "Fog Tweaks"
(→Tweaks) |
(→Tweaks) |
||
Line 12: | Line 12: | ||
=== Persistent DB Connection === | === Persistent DB Connection === | ||
*Use a '''Persistent DB Connection'''. This uses the already established connection to get the data, rather than reopening the socket or TCP link | *Use a '''Persistent DB Connection'''. This uses the already established connection to get the data, rather than reopening the socket or TCP link | ||
− | #Open this file '''/var/www/fog/lib/fog/Config.class.php''' | + | *#Open this file '''/var/www/fog/lib/fog/Config.class.php''' |
− | #Go to line: <pre>define('DATABASE_HOST', 'localhost');</pre> | + | *#Go to line: <pre>define('DATABASE_HOST', 'localhost');</pre> |
− | #Change to: <pre>define('DATABASE_HOST', 'p:127.0.0.1');</pre> | + | *#Change to: <pre>define('DATABASE_HOST', 'p:127.0.0.1');</pre> |
− | #Restart mysql: <pre>service mysql restart</pre> | + | *#Restart mysql: <pre>service mysql restart</pre> |
− | #Open this file '''/opt/fog/.fogsettings''' (so updates/upgrades to overwrite the settings above) | + | *#Open this file '''/opt/fog/.fogsettings''' (so updates/upgrades to overwrite the settings above) |
− | #Go to line: <pre>snmysqlhost="";</pre> | + | *#Go to line: <pre>snmysqlhost="";</pre> |
− | #Change to: <pre>snmysqlhost="p:127.0.0.1";</pre> | + | *#Change to: <pre>snmysqlhost="p:127.0.0.1";</pre> |
*If you DB is on another server, use p:[ipaddress of DB server]. | *If you DB is on another server, use p:[ipaddress of DB server]. | ||
+ | |||
+ | === PHP Session Expiring == | ||
+ | *Known bug in Ubuntu's config. It's running fuser for each PHP session file easily racking up thousands of processes. | ||
+ | *#Open this file '''/etc/cron.d/php5''' | ||
+ | *#Go to line: <pre>09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete</pre> | ||
+ | *#Change to: <pre>09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete</pre> | ||
+ | *#Restart apache <pre>service apache2 restart</pre> | ||
=Results= | =Results= |
Revision as of 16:48, 11 December 2014
Tweaks
- The following sections are devoted to strictly performance. If there are always pros and cons when tweaking to read carefully. All Pros/Cons should be added.
- ALL these Settings must be changed by the FOG User. If tested continuously and fully approved then these may make it into the Default Setup of fog.
- DO AT YOUR OWN RISK
- Pros description of the good
- Cons description of the bad
- PvC A rating scale of 1 to 10, 1 being the ALL Con and 10 being ALL Pro
- Dev. Approved One or multiple developers of Fog has approved this setting to be used in most installations of FOG.
Persistent DB Connection
- Use a Persistent DB Connection. This uses the already established connection to get the data, rather than reopening the socket or TCP link
- Open this file /var/www/fog/lib/fog/Config.class.php
- Go to line:
define('DATABASE_HOST', 'localhost');
- Change to:
define('DATABASE_HOST', 'p:127.0.0.1');
- Restart mysql:
service mysql restart
- Open this file /opt/fog/.fogsettings (so updates/upgrades to overwrite the settings above)
- Go to line:
snmysqlhost="";
- Change to:
snmysqlhost="p:127.0.0.1";
- If you DB is on another server, use p:[ipaddress of DB server].
= PHP Session Expiring
- Known bug in Ubuntu's config. It's running fuser for each PHP session file easily racking up thousands of processes.
- Open this file /etc/cron.d/php5
- Go to line:
09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete
- Change to:
09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete
- Restart apache
service apache2 restart
Results
Option | Pros | Cons | PvC | Dev. Approved |
---|---|---|---|---|
Persistent DB Connection | Speed in Web GUI response time | Connection is always open | 9 | ✔ |