测量最大PHP内存使用量 [英] Measure maximum PHP memory usage
问题描述
设置 php_value memory_limit
总是涉及到一些猜测,我自己倾向于使用高于必需值,以确保奇怪的内存饥饿呼叫不会导致致命的错误。
Setting php_value memory_limit
always involves a bit of guesswork and I myself tend to use higher than necessary values just to make sure that the odd memory hungry call does not result in a fatal error.
仍然,我正在寻找一个类似于 htop
或 top
,而不是显示当前值,它只会记住PHP脚本占用的最大内存并保留它。在几天之内,这个价值将是一个非常有价值的指标,指出应该设置什么 php_value memory_limit
。这样做存在吗?
Still, I am looking for a shell script that would behave kind of like htop
or top
but instead of showing the current values it would remember only the maximum memory consumed by a PHP script and retain it. Such value, over a few days, would be a very valuable indicator of what php_value memory_limit
should be set to. Does something like that exist?
推荐答案
这篇关于测量最大PHP内存使用量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!