Do I need a dedicated server? (Gallery2 related)

Associate
Joined
17 Mar 2004
Posts
1,562
I have a Gallery2 installation at http://www.yorkshirejunkies.co.uk/gallery

It's a pretty basic install - i've turned the majority of features off along with the user accounts (so less strain on the db) but it seems to be getting slower and slower. I can understand this to a degree as there are over 9000 images, however it's getting to the point where it's pretty much pointless browsing due to the speed of it......

The hosting is with Dreamhost and it's pretty cheap (excellent in every other aspect though I might add) so i'm wondering if thats the reason?

Or do I need some sort of dedicated server? According to stats it goes through around 15GB a day averaging around 40,000 hits.

Cheers :)
 
Ouch, 15GB a day isn't an insignificant amount on a shared hosting platform. The cost of simply providing that bandwidth is probably a fair amount alone (Your usage is probably getting on for 2mbit 95th percentile). You might want to look at compressing and optimising your images a bit more to start with.

That said your site does seem pretty slow when just browsing, and I'm unsure of what kind of database load a gallery2 site like yours might utilise. Does gallery2 render thumbnails and resize images on the fly? Does it cache anything? Can you generate static files periodically (every time you upload new images/once a week or something) and serve those instead to save on database load?
 
what's your current hosting spec?

i don't think it's that necessary to have a full on dedicated server for G2. Basically G2 loves MySQL power ... which means fast hard disks and fast CPU.
 
yeah each of your images is about 300kb which is a lot for a medium image. You could compress them down to about 70K and still keep good quality.
 
I run this G2 installation http://www.pureanimegallery.com on a standard Vidahost account. Performance is good considering it's gallery2. I've got partial caching enabled which is supposed to speed things up by 15%.

15gb a day is a lot though. don't know if shared hosting would be suitable for that kind of traffic. You might need a VDS, which is your own slice of a decent server and it usually comes with more bandwidth than shared.
 
how much of that 15gb is people leeching your images? Have you got Mod rewrite module installed?

Peeps could be hot referencing your images directly and pinching your bandwidth.

With mod-rewrite enabled in one of the plugins you can disable people from leeching your images so that they are only displayed on your gallery.

try ... leechig your images here .. as a test (i'll edit it out tomorrow).

Every access of this thread uses 300kb of bandwidth from your account, unless it's cached on server - but on a massive shared i'd doubt it

[removed image link] -blade
 
Last edited:
450Gb/month is a lot for shared hosting - you'd probably be best of getting something like a dual core dedicated server with 2 - 4Gb RAM and SCSI drives. But, of course, that doesn't come too cheap.

So-called 'premium' or 'semi-dedicated' hosting may also be an option, as you're generally put on a very powerful system with only a handful of other sites.

I only tend to recommend VDSs for users who require stability or security for smaller sites as with VDSs you're limited by RAM mostly - 512Mb won't get you very far on an intensive site, and you may also require more CPU than you're allowed.

I run this G2 installation http://www.pureanimegallery.com on a standard Vidahost account. Performance is good considering it's gallery2. I've got partial caching enabled which is supposed to speed things up by 15%.

15gb a day is a lot though. don't know if shared hosting would be suitable for that kind of traffic. You might need a VDS, which is your own slice of a decent server and it usually comes with more bandwidth than shared.
Show off the other one you have, you know you want to :p

Edit: More importantly re blade's post above, every access of the image requires server resources to pull it out - it's not just a direct serving of a file from the server. That's one of the reasons G2 is quite resource-intensive if you want/need to do a lot of what-should-be linking to static images.
 
Last edited:
Show off the other one you have, you know you want to :p

:D:D:D

ok ok .. :p I got another special account for client hosting on a new server from Vida. A nice account, more of an investment, on a brand new server with all sorts of stuff on it. Bean knows what it's running but i think it's a quad core, SCSI RAID system with various caching technologies.

This will give you an indication of G2 running on a very fast server ...
http://www.bathroomsandtiling.co.uk/gallery/main.php. There's probably a few hundred photos in there. But look at the speed of it! It flies.

This server is a lot faster than the standard vida. Even the notorious Imageblock calls on the homepage are instant.

I've never seen gallery2 running so fast to be honest. Not anywhere. Might be a tad slower for all your photos but it seems to really nail Gallery2 installations.

Like I said, fast disks fast cpus and decent setup make G2 rock.

btw I'm not affiliated with them. I just buy their services and write what I think.
 
That said your site does seem pretty slow when just browsing, and I'm unsure of what kind of database load a gallery2 site like yours might utilise. Does gallery2 render thumbnails and resize images on the fly? Does it cache anything? Can you generate static files periodically (every time you upload new images/once a week or something) and serve those instead to save on database load?

Yeah, it does the automatic resizing/generating of thumbnails on the fly.



How did you manage to hotlink that image? If I view an image, copy the location and place it in between the [ img ] tags etc it dosen't show?

I'l look into the mod rewrite...

Regarding the image sizes, it's not just me uploading them so all sizes/resolutions are on there. I guess a lot of people just upload them straight off their camera which is nice in a way as we've got quality images but at the same time we're ending up with 3MB+ files.

I'm not sure of the specs with Dreamhost - i'l see if I can find out.

Regarding some of the specs people have recommended, how much are we talking? I know it will differ from host to host but a rough price would be good. The only problem is the site is non profit so don't want to invest too much into it.

:)
 
Regarding the image sizes, it's not just me uploading them so all sizes/resolutions are on there. I guess a lot of people just upload them straight off their camera which is nice in a way as we've got quality images but at the same time we're ending up with 3MB+ files.
There be your problem. When uploading, get GD to spit out an ultra compressed thumbnail, and a moderately compressed image, both at fixed dimensions.

That, I predict when combined with mod write, will slash your bandwith by at least 50%.
 
I don't get why you would invest in a ridiculously fast server ahead of implementing memcached or at the very least some sort of static file-based caching :/
 
450Gb/month is a lot for shared hosting - you'd probably be best of getting something like a dual core dedicated server with 2 - 4Gb RAM and SCSI drives. But, of course, that doesn't come too cheap.

That is waaaay overkill.

Dreamhost are the worst of all shared hosts for overloading, so I'm not suprised. A quality shared provider like Vidahost would do much better, although to get real quality bandwidth you'll have to pay a bit.

I'd reccomend looking into a low end dedicater server from a decent provider. If you get a good memcache running the php/sql load won't be too high and it'll just be the bandwidth to worry about.
 
hummm .. I've got block hotlinking on another G2 installation and haven't seen this problem. You do have your own site set as a valid referrer in the MOD-Rewrite plugin?
 
Back
Top Bottom