PHP is a versatile language that gives the programmer many tools to get the job done. One such tool is sessions, but in some cases sessions can have a detrimental effect on your site’s performance.

Since switching from a Windows server to a UNIX server, I noticed a huge increase in overall site performance – but sometimes, with no noticeable pattern, a page would take a minute to load against the average which was under a second.

After messing with the scripts and painstakingly commenting out sections of code, I discovered that the problem lie quietly in the PHP sessions – specifically the session_start function. Perhaps it has something to do with disk operations and UNIX operating systems, whatever it was it was causing some frustrating performance problems.

Read the rest of this entry