News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Image upload and cpu usage

Started by NicolasB, December 13, 2005, 05:58:17 AM

Previous topic - Next topic

NicolasB

Hello

This is now one month that I have converted my forum to SMF forum.
I am really happy with the SMF messages board php script.
I have 88051 posts in 8464 topics with 1072 Members.
The members post around 400 posts per day.

File upload is enabled and all the members upload around 300 images ( maximum 150 kb per image ) each day. The images uploaded are displayed automatically in each post.

Now i am getting a mail from my host ( shared hosting ) ; he says that I am using to much CPU.

Do you think that the files upload and downlaod causes the CPU over-usage ? ( the images are not resized )
If yes, is it possible to configure SMF to upload the images on another server ?
If yes, does it will reduce the CPU usage ???

Thanks for your help,

Regards

Nicolas


Grudge

Hi,

I cannot imagine that uploading 300 files a day is causing your CPU any problems at all. You really need to ask your host for more information - what exactly is causing the increased CPU load? I assume you are on shared hosting?

400 posts a day shouldn't cause SMF any problems. Are you using SMF 1.1? Also, what version of MySQL is installed? I'd recommend uploading a status.php file and linking it here so people can take a look at what could be the problem (If at all)
I'm only a half geek really...

NicolasB

Hello

Thanks for your help :

My host has sent me this when I was on Phpbb script 2.0.16

Oktober 17, 2005
Average %CPU usage - 11.50
Average %Memory usage - 10.05
Average %MySQL usage - 1.2
Top Process %CPU 25.0 /usr/bin/php
Top Process %CPU 20.0 /usr/bin/php
Top Process %CPU 17.0 /usr/bin/php

Now after 2 months : converted to SMF 1.0.5 and few modifications ( like hotlinks forbidden and unlinking of the images uploaded on my webspace )

December 10, 2005
Average %CPU usage - 1.49
Average %Memory usage - 0.80
Average %MySQL usage - 0.3
Top Process %CPU 18.0 /usr/bin/php
Top Process %CPU 17.0 /usr/bin/php
Top Process %CPU 15.0 /usr/bin/php

Yesterday , I have re-set the uploaded images on my webspace to see if it causes the problem ...

I have downloaded a status.php file that I have found on this forum but it seems to only work with SMF 1.1 version ...

I am running SMF 1.0.5 , do you have any status.php file for the 1.0.5 version ?

Lot of thanks

Nicolas

Grudge

I'm confused. Looking at the figures you've just posted they show SMF usage is a tenth of what it was under phpBB in October - are you sure you have them the right way around? (Not suggesting that they should be higher - but it goes against what you said about higher CPU usage now)
I'm only a half geek really...

NicolasB

#4
These are the real statistics ...

Before converting to SMF , I had disabled GZIP compression of Phpbb and the server usage decreased a lot at all !!

I was running Phpbb with an external page with files upload service on my webspace,  gzip and no hotlink protection. Also image resized with GD library.

Average %CPU usage - 11.50
Average %Memory usage - 10.05
Average %MySQL usage - 1.2
Top Process %CPU 25.0 /usr/bin/php
Top Process %CPU 20.0 /usr/bin/php
Top Process %CPU 17.0 /usr/bin/php

Then, I have disabled GD library resizing and Gzip

Average %CPU usage - 3.90
Average %Memory usage - 1.96
Average %MySQL usage - 0.6
Top Process %CPU 59.3 /usr/bin/php
Top Process %CPU 18.0 /usr/bin/php
Top Process %CPU 17.0 /usr/bin/php

My host says Your average CPU/Memory usage continuously stayed above the limit of your current hosting plan

Then I have converted to SMF forum and disabled SMF file attachment and image upload on my webspace

Average %CPU usage - 1.49
Average %Memory usage - 0.80
Average %MySQL usage - 0.3
Top Process %CPU 18.0 /usr/bin/php
Top Process %CPU 17.0 /usr/bin/php
Top Process %CPU 15.0 /usr/bin/php

Is it posible to find a status.php file for the SMF 1.0.5 version ?

Kind regards,

Nicolas


Ben_S

The existing status.php will work fine with 1.0.5.
Liverpool FC Forum with 14 million+ posts.

Grudge

I do wonder if there's much more you can do? I mean looking at those stats moving to SMF has reduced your hosting load to 10% of your original values under phpBB. Is that load figure the server load, or the percentage of the server that you are using? 1.5 would be a high server load (But not attribitable to only you if you're on shared hosting). 1.5% of all CPU seems reasoanble for a shared account.

Ben is actually probably more helpful here than me :D
I'm only a half geek really...

Advertisement: