Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue May 15, 2012 2:40 am 
Offline
Newbie

Joined: Tue May 15, 2012 2:04 am
Posts: 4
Hi there,

I'm a newcomer to Linode (still on my first month) recently transplanted from Dreamhost. I used to run 4 forum sites off a 300 MB RAM VPS there but was getting fed up with the random outages and run-around customer service.

The only nice thing I had there was the "unlimited" bandwidth, which I'm aware is more or less just a marketing gimmick, but at least I never had to worry about it until they thought it was getting out of hand. A couple of my sites have some image galleries but other than that, nothing big like video/audio streaming.

I'm on a Linode 768 package and I'm over 80% of my monthly bandwidth use less than halfway through the month. I noticed that from the graphs (Linode's CP is awesome by the way) early in the month that I was using between 4-6% of my 300 GB a day. I tried to install Munin to better track where this was all going but I was having a lot of trouble getting it to work with nginx. I put my sites on Cloudflare, set cache expires to their max age for most file types, and moved as much of my static files to a friend's server as I possibly could, but my bandwidth usage still seems excessive for the size of my sites.

So in regards to all that, I have a few questions for other members here and would appreciate any input you might have:

-Would you consider Linode's transfer limits on the lower end in comparison to the amount of RAM and disk space you get? I got the 768 package thinking I'd have some room to grow into it, but at this rate I'll probably be about 150GB over my limit for this month and even more as my sites continue to grow.

-Is there a drop in solution for monitoring bandwidth usage on nginx with virtual hosts? The graphs in Linode's CP have spiked up to 10Mbps a few times this month but other than that it usually just hovers between 0.5-2.5Mbps.

-Are there some common pitfalls in regards to excessive bandwidth usage that you think I might have missed?

Thanks for reading and hope to hear from you. :D


Top
   
PostPosted: Tue May 15, 2012 5:32 am 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
llamaosama wrote:
I put my sites on Cloudflare, set cache expires to their max age for most file types, and moved as much of my static files to a friend's server as I possibly could, but my bandwidth usage still seems excessive for the size of my sites.


gzipped HTML/CSS/JS output too? (gzip on; in nginx)

I'd assume text heavy forum threads would compress nicely.


Top
   
 Post subject:
PostPosted: Tue May 15, 2012 7:14 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
awstats can translate nginx access logs into bandwidth usage.

jpegoptim and optipng can save you a lot on images files by recompressing them.

If you have say user avatars make sure it's not using a 2mb file then letting the browser resize it down to 80x80px that would be huge waste of bandwidth.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Tue May 15, 2012 10:25 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Make sure you also have a reasonable file size limit on avatars and sigs (if you host them) too. As an example, the Linode forums limit avatars to 80x80 pixels and no more than 6KB in size. This is plenty for any still image.

It might seem like a silly thing to limit, but I see people with multi-megabyte animated avatars, and you have a thread with ten 2MB avatars, then 1GB of traffic only gets you 51 pageviews...


Top
   
 Post subject:
PostPosted: Tue May 15, 2012 1:56 pm 
Offline
Newbie

Joined: Tue May 15, 2012 2:04 am
Posts: 4
Hey all, thanks for the input :)

I have gzip enabled on nginx, Zlib in PHP off, and gzip disabled on the individual forum scripts. I've read that having compression enabled at multiple points gets you no extra compression, but if you know differently please let me know. Here are my gzip settings in my nginx config:
Code:
   gzip on;
   gzip_http_version 1.1;
   gzip_buffers 16 8k;
   gzip_comp_level 9;
   gzip_min_length 1024;
   gzip_proxied any;
   gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
   gzip_vary on;

I know most people say level 9 is a waste of CPU but my server typically runs 0.5 - 1.0 load so I don't mind a little extra work on the CPU for just a little bit more saving on bandwidth.

Cloudflare's minifying features are enabled as well. I've compressed nearly all of my static images with smush.it as well as imgopt (which uses various lossless image compressors) Avatars are fairly small on my sites and most users don't have them. There definitely aren't any even close to 2 MB or anything like that.

I'll give awstats a try obs, thanks for the suggestion. Hopefully it's a bit easier than getting munin to work with nginx.


Top
   
 Post subject:
PostPosted: Wed May 16, 2012 2:37 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Analog will also look at your logs and tell you what is consuming the most bandwidth. You are correct that compression should only be enabled in one place.


Top
   
 Post subject:
PostPosted: Wed May 30, 2012 4:52 pm 
Offline
Newbie

Joined: Tue May 15, 2012 2:04 am
Posts: 4
Thanks for the tips guys, unfortunately it doesn't seem like the sites I run are affordable here. The service at Linode has been great, but I can't seem to make it the bandwidth work with my budget. Wish you guys the best.


Top
   
 Post subject:
PostPosted: Wed May 30, 2012 5:36 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Did you ever figure out what was using up the bandwidth?


Top
   
 Post subject:
PostPosted: Wed May 30, 2012 7:02 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
llamaosama wrote:
gzip disabled on the individual forum scripts.


But why? That's the bulk of your content since you can't quite cache that, but can set nice client-side cache times for images, js and css.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group