Experienced developers can use an advanced feature to monitor their applications behaviour and improve performances.
Process analysis generates a file, available at the account root (searchable in SSH or FTP), which describe operations done by the process for a specific period.
Start the analysis
The process analysis feature is available in the Advanced > Processes menu, by clicking in the Process analysis button.
PIDs: The list of PID processes to analyze (use space to separate). If this field remains empty all processes corresponding to HTTP requests will be scanned.
Analysis duration: once the analysis is started it will run for the specified time (in seconds). In general, 30 to 60 seconds are enough: the scan only works if website pages are displayed. Time is needed to display some pages, but avoid to record too much datas to keep the result readable.
Interpret: by default the analysis result matchs the result of a strace, which can be difficult to read. If this option is activated the result is interpreted and filtered.
Slow operations: by activating this option only operations considered as slow (at least 1ms) or siginficant will be displayed.
Once the analysis started, you just need to visit pages you want to monitor in your web browser, for the duration of the scan.
The process PID is displayed in the process table which is displayed under the "Process analysis" button. Sometimes there is no process in the table. They will appear if you visit some of your website pages.
Caution, the generated file can contain sensitive data, like passwords.
The file content which has analysis results has one operation per line as these ones (shortened and truncated for readability):
5857 16:16:57.265015 0.029 ms Send data (MySQL) ("SELECT * FROM posts WHERE posts.post_type = 'page' ORDER BY posts.post_date DESC"...) 5857 16:16:57.265105 53 ms Wait until being able to receive data (MySQL)
These lines contains PID process which executed the operation, the time of execution, its duration and the operation.
Here we see a SQL query has been sent to a MySQL server. The request sending only took 0.029ms, which is really fast, but the following line shows it took 53ms before the MySQL server was ready to send the answer, which is much slower.
All results are not so obvious: in many cases even if no operation is really slow, it is their large nubler that makes the website slow. If so you need to restart the analysis by deactivating the Slow operations filter.
Sometimes a process analysis starts while it was already responding to an HTTP request. The analysis tool won't be able to accurately interpret the operations performed for the current query. L'outil d'analyse ne sera pas capable d'interpréter avec précision les opérations effectuées pour la requête en cours. It's better then to look for the beginning of another query. They are usually identified by a line like this one:
73510 16:53:04.551317 1.08 s Wait for incoming connection from socket...