M
M
Maxim2010-11-23 11:37:22
PHP
Maxim, 2010-11-23 11:37:22

PHP: memory_get_peak_usage under eAccelerator?

Large PHP project. We are rolling out a new version to the server - memory consumption (memory_get_peak_usage at the end of the executable code) has doubled.
They got excited and started digging.
Disabling eAccelerator shows that both the old and new versions consume the same amount.
We turn on eA - again the difference is two times.
Actually, questions:
1. Since the memory consumption of the same script with eA disabled and with eA enabled is noticeably different, it was concluded that in the case of a running eA, the opcode of the script itself is not included in the consumed memory, because it lies in shared memory. Is it so? If this is not the case, then how else can you explain the huge difference in the result of memory_get_peak_usage under the same conditions?
2. And most importantly: what could be a reasonable explanation for the behavior outlined in the first part? When without eA the memory consumption has not changed (and we tend to believe this), and when eA is turned on, a completely unrealistic increase in consumption is issued.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tzlom, 2010-11-23
@tzlom

are you so worried about the extra 4 MB?
if yes, then consider the weighted average with weights by execution time, maybe you only win
and yes, the new version of the code does not always mean good )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question