Professional Projects

PHP/SQL Server Application Performance Analysis

As an employee at JP Morgan Chase, I spent some spare time analyzing and suggesting ways to improve the performance of a jQuery/PHP/SQL Server dashboard used by over 200+ employees to monitor the status of development, test/QA, and production systems. The dashboard was running on a single dual core server and receiving over 20k hits per business day. Creating a local clone running under Apache with PHP + xdebug, I was able to profile the PHP code and identify certain hot spots where performance was poor. These areas typically executed generic queries and performed significant data processing and manipulation in PHP before returning the data as JSON. With the help of SQL Server Management Studio and its query plan explanation component, I was able to re-work queries to off-load more bulk processing to SQL Server and return a small result set to PHP. The SQL Server had significantly less load (around 60% CPU utilization during peak times). The resulting query cost was slightly higher than the original, generic query (around ~10% more resources required on the SQL end). On the PHP side, processing dropped significantly and page load times dropped from 750-800ms to 80-90ms for a single JSON request. In addition, the optimized code could be reused by refactoring some other similar JSON calls. After preliminary work was done and prepared, I was allocated official time to work on further optimizing the application. Although time was limited, final results brought 3/8 REST calls from around 750-800ms to 80-90ms while reducing web server load in the process.