I
I
Ivan Palamarchuk2017-04-27 04:39:08
PHP
Ivan Palamarchuk, 2017-04-27 04:39:08

How to profile PHP 7.1 in production?

Good afternoon, at loads more than 150 RPS, some "unrest" begins from the backend. And not the generation time does not always depend on the RPS. For example, at the peak of RPS (~260), responses came 2 times faster than at ~200.
e0e4a33a02c3455bbd4a42ffed76302c.png
It's an API (JSON only). Under the hood php 7.1 and redis. You need to understand what exactly slows down the system, I think it's redis. it is single-threaded, and the script creates pconnect every time i.e. possibly wasting time waiting.
I wanted to install XHprof, but it hasn't been supported for a long time and there's nothing there for PHP 7.*. What do you profile in production?
Thank you!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
DevMan, 2017-04-27
@delef

paid:
blackfire
newrelic
tideways
free:
xdebug
fork of xhprof

A
Alexander Aksentiev, 2017-04-27
@Sanasol

start with munin

G
Grigory Esin, 2017-04-27
@xotey83

pinba

S
Site Developer, 2017-04-28
@secsite

I recommend watching and listening to the report of the VP developer . Although it seems to be about VP, but in this case it is a particularity. In general, it is useful for any developer to know. It covers both methods and tools for profiling.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question