MALdito
11-02-2004, 12:11 AM
I have a "big site" on some server .... which seems to be causing a heavy load on the cpu. Basically it runs a phbb2 forum and some homemade apps..
my apps are basically gallery-makers .. using the opendir php function ..
usually 25 files are scanned and printed as thumbnails
my question is .. can it be that this is causing all the load in the cpu?
jasong
11-02-2004, 12:16 AM
Does it create thumbnails each time the the images are displayed?
Or does it create the thumbnails right when they are uploaded and then just display the thumbnail?
That can play a HUGE factor.
MALdito
11-02-2004, 12:29 AM
first option ..
creates the gallery everytime you access the page
jasong
11-02-2004, 12:32 AM
Well, that would be your problem!
What you need to do, is when the photo is first uploaded, create the thumbnail and save it.
Then, whenever you need to see the thumbnail, just call the thumbnail and link it to the big one.
....yup :)
MALdito
11-02-2004, 12:52 AM
actually, this is how it works:
first the cp:
you put in the db the dir where th and big images are stored.
gallery.php:
the app queries the db for the dir name, does the opendir thingy and prints all the images paths into the html .. on the fly
jasong
11-02-2004, 12:58 AM
Ohh... I thought you said that you have something that actuall creates thumbnails on your sever and displays thoughs...each time.
I dont think what you are doing should be hoggin that much cpu then.
How many images are in each directory?
MALdito
11-02-2004, 01:05 AM
100s ... however, we display only 25 each time ..
i just noticed that the server even goes up when enabling the gzip compression option in the phpbb2 forum
CyberAlien
11-02-2004, 07:01 AM
For phpBB there are few tweaks to speed up forum and decrease CPU usage.
1. eXtreme Styles mod that caches compiled templates: http://www.phpbbstyles.com/xs.php
2. There is a big thread about tweaks for large forums. That thread is created by lanzer who owns one of the largest forums on the internet (many times larger than WHT): http://www.phpbb.com/phpBB/viewtopic.php?t=135383
MALdito
11-02-2004, 12:02 PM
my forum has 20 to 80 users logged in ..
i don´t think that qualifies as a big forum
CyberAlien
11-03-2004, 07:01 AM
It also depends on server. For average server 20-80 logged in users is a lot.
For example, phpbb.com is on dedicated server with very good specifications and usually there are 200 users online and server is always overloaded.