Hello thanks for reading my question
I'm on a share host and they just move my site to a junk server because they said that I'm using to much cpu related to php
User: me
Domain: mysite.com
CPU%: 1.43
MEM%: 0.88
MySQL: 0.6
Top Process %CPU 16.0 /usr/bin/php
Top Process %CPU 15.0 /usr/bin/php
Top Process %CPU 10.2 /usr/bin/php
A whole 1.43 % wow, that is a lot....LOL but being a good person I went back through my scripts and added in a nice little cache system, which cached each page and at the top of the script it checks for the cached file, if there it use it base on file time stamp.
The time is in second and I have it do an update about 1 -4 weeks depending on file cache.
So I ask the to check again and I get this
Hello
Here is your resource usage: wich is very hight
mydi mysite.com
CPU%: 3.15
MEM%: 1.70
MySQL: 0.9
Top Process %CPU 50.0 /usr/bin/php
Top Process %CPU 48.0 /usr/bin/php
Top Process %CPU 44.0 /usr/bin/php
It's very high, please continue to make optimization and also you can try to block spiders and search bots
Thank you
Being that I am an electronic engineer and I do understand how servers work electrically but I'm not an expert in software end of it. However, I believe this is just a load of bull pucky and it is nothing more that hosts trying to line thier pockets by forcing you to upgrade.
I have about 15,000 pages and about real visitors a day plus bots.
The stupid statement about can try to block spiders and search bots
is laughable......LOL....what the heck is the point to having a website then??
Anyway, I would like to know why caching most of my pages would increase CPU usage, this seem impossible, and I believe they have their servers set up wrong and trying to cram too many sites on to one server.
So does anyone know how or why cache would increase CPU time?
What areas should these people be looking at to optimize their server?
What else can I do to reduce CPU/PHP usage in my scripts