R
R
Ryudzaki12015-10-29 02:33:27
PHP
Ryudzaki1, 2015-10-29 02:33:27

Loading php script, what to do?

Hello, there is a php script, I myself added it to cron to run every 4 minutes. With the help of wget
In a day I look at the graph of the load on the operative, for a day smoothly from 10% to 80%.
I do a reboot, again everything is in its place, the load is 10% in a day again from 10% to 80%.
Of course, the simple solution is to simply remove this script and not toil with garbage.
But I need it, you can set it up in cron reboot, but why is this a perversion.
What is the way besides reboot?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Azazel PW, 2015-10-29
@azazelpw

What is your understanding of the load on the RAM?
The fact that the site is cached is not a load.
Write the output of the
free -m command
. If it is cached in a large volume, then it's okay.
you can write a script to reset the cache if it bothers you
sync ; echo 3 > /proc/sys/vm/drop_caches

I
index0h, 2015-10-29
@index0h

How long does it take to run a query? If >4 minutes - increase the delay time.
If the script is simply badly written and calculates the number of PI up to 10^100 on the way, you will have to rewrite it.

D
Dmitry, 2015-10-29
@zmitrok62

Does it have time to complete before the next instance starts? Maybe they overlap each other?
Run for an hour, for example, and you'll see:
ps aux | grep yourprocess | wc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question