Mailsack: Host with the most
Kris Straub - Saturday, November 29, 2008 8:14How’s your Thanksgiving?
I’ve been enjoying my time off from the site, but let’s get to some business with a more technical question. Thea writes:
After watching poor Meredith go through rebuilding Octopus Pie, I was wondering how one avoids having their account suspended due to too much traffic. I know that you covered this a little bit in the book, but how specifically does WordPress CPU usage relate to this? What is the best caching plugin for WordPress/ComicPress, and how does caching work? How can artists prepare themselves and their webhosts for that hoped-for-yet-feared sudden jump in traffic, without losing their site and thus a lot of potential readers? And is this a good argument for posting your comic on a community webspace like Keenspot, etc.?
This is a good question, and one I fret about a lot (lately for good reason). Meredith ran into problems with Octopus Pie’s host, who canned the site after they deemed it too resource-intensive. What a nightmare!
I talk about it in the book, but let me go over the general points of hosting. There are two major kinds: shared hosting, and dedicated hosting. Shared hosting means a bunch of websites are stored on the same server. Your comic has its own subdirectory, some other business has another one, yet another guy keeps his stuff in another one, etc. When you FTP in, you can’t see anyone else’s directories or websites — you just see your stuff because they keep your permissions separate. But you’re all using the same server resources: bandwidth and CPU.
Dedicated hosting means your website is the only one on a particular server. So you have the whole machine to yourself, and the whole CPU. But let’s go back to talking about shared hosting, because it’s most likely what you’re able to afford (dedicated can cost like $200 a month, whereas shared is more like $10 — that’s why I’m still on shared).
So your site shares the resources of its server with the other hosted sites — which can cause problems if your site is a hog. Bandwidth is much cheaper these days, so let’s talk about dynamic script overhead. If you get a lot of traffic and are running a dynamic archive system like WordPress with (the excellent) ComicPress, it’ll consume a lot of time on the server CPU, and your host may write you a letter saying “hey guy, other people’s sites can’t run their stuff because your site is a big fat pig. You got to get that under control or we’ll drop your account.” No one wants to wake up one morning to find their site completely dead, and an e-mail from your (former) host saying “good luck and good riddance.”
If you’re running WordPress, it is essential to grab the plugin WP Super Cache. Again, this is discussed in the book, but WP Super Cache creates static, easy-to-serve pages from your dynamic, CPU-hog pages, and sends the static pages to visitors’ browsers. Your site works the same, but it eases up on the processor use, and you’ll keep your host much happier. You can set the page time-out and a couple other variables in WP Super Cache — it’s pretty straightforward. I have Starslip’s super cache expire time set to the default: 21,600 seconds. That means after a page is 21,600 seconds old, the next time a visitor visits it, Super Cache will make a new caching of that page, to give the illusion of relative freshness.
I used a lot of words to tell you “download WP Super Cache.” But let’s consider other potential sources of CPU hoggery: plugins! It can be tempting to load up your WordPress with a mess of them. Plugins (like Super Cache) are free, and can automate and all kinds of blog management tasks: traffic analysis, user submissions, search, an improved upload interface, SEO tools, a bunch of neat stuff. But plugins add complexity, and complexity is the bane of efficiency, so if your site is running slow, it might be that you’ve got too many activated.
Now — why use a dynamic script in the first place, if a caching solution just converts dynamic pages into quasi-static pages? For me, the answer was relatively simple: I really wanted WordPress’ publishing capabilities, and I wanted its comment abilities per comic.
But right now, I actually don’t use WordPress’ own comment system. I installed an external system for all my comics that Joel Watson turned me on to. It’s called IntenseDebate. Basically, IntenseDebate provides you with a per-post commenting system that’s centralized on their server. It’s pretty neat — it lets your readers set up a single account that’s usable at any site that uses IntenseDebate for its comments. I like that it has a cross-website functionality, and turning off WordPress’ own discussion handling certainly doesn’t up overall CPU usage.
How much it would decrease CPU use by, I don’t know — some people swear by WordPress, and others say it’s a bloated, inefficient monster. Me, I’m on the fence. Starslip uses WordPress, and it’s the biggest site I have, but my other two comics, Chainsawsuit and F Chords, use a script that generates static HTML that I originally wrote for Blank Label. The fact is, for all the nice stuff WordPress does, I’m not sure that I need all of it.
There are a lot of scripts out there besides WordPress, and it’d be worthwhile to open up a discussion as far as which ones are the most usable, the easiest to install, etc. Comment with your experiences!
As far hosting your site somewhere else, it’s certainly an option if you absolutely don’t want to deal with technical stuff. But at any stage of webcomicking, I think that being familiar with the workings of a website is important — especially when you realize that when stuff goes wrong, there’s only one person who has your absolute best interests at heart: you. That’s why I would rather handle it myself and just take the little bit of time to learn it, rather than hope my downed site is a priority for whoever is fixing my script.





ryan says:
November 29th, 2008 at 6:42 pm
If you’ve got the technical know-how, a VPS or slice is a great compromise between shared and dedicated hosting. The cost is equivalent to shared hosting, but you get a slice of a real server that, to you, acts like dedicated. There are many providers; I use Slicehost.com. The capacity is scalable (as is the cost). I use a 256MB slice for my personal sites ($20/month), and the site I built for the company I work for is on a 1GB slice ($70/month). As I begin providing hosting for my own clients, I can move up to more capacity. With this provider, I can configure the server as if it were a machine sitting right next to me, which affords near-total control but also requires an equal amount of responsibility. It’s not for everyone and it was quite a learning experience to learn how to configure a fresh Ubuntu server install from a command line over an SSH connection. Other hosting providers are out there that trade some control for convenience, using web-based control panels to set up common functionality. LiquidWeb happens to be one such provider that I tried briefly.
Johan says:
November 29th, 2008 at 7:05 pm
Any chance you’ll ever release the script you use on Chainsawsuit and F Chords?
Tyler Martin says:
November 29th, 2008 at 9:35 pm
To add to this excellent and informative article…
Beware plug-ins that are obviously CPU intensive… that have a lot of work to do with every post or pageload, cross-posting to Twitter or LiveJournal, generating site stats, creating relative posts and other stuff on the fly. Sure plug-ins are a big selling point for WordPress, but if you are going with the benefit of cheap hosting you may need to compromise. Also keep in mind, that anyone can write a plug-in and post it on the site, optimized or not, and many of them only claim to be in a beta stage and are not able to be tested across the numerous server environments out there the way WordPress is.
Also plug-ins that are merely replacing and inserting code, you don’t need them. With a little investigation you can find where to insert some code to generate social share links and Google Analytics code and such.
Use JavaScript when you are able, let the viewers computer share the load a bit, JavaScript and Flash files (not accessing a database) are all processed on the viewer’s computer. Use a JavaScript image or ad rotator over a PHP one if possible (this also benefits having to learn to exclude them from caching).
Run the Google Sitemap generator plugin so that search engines that take advantage of that do not ransack your entire site when updating records. Run a database optimization plug-in, or go to your phpMyAdmin once in a while and keep the database optimized for cleaner access.
Use features that run on other servers. Like an ad network that just gives you JavaScript code but handles ads from their servers. Also definitely run traffic stats offsite, other items would be a photo gallery or even as Kris mentioned, comments if your site handles a lot of them. The WordPress development company actually recently acquired IntenseDebate so it should be pretty seamless to use.
For hosting it might be worth it to pay a bit more ($20 vs $10) to get an account with a classier operation like http://mediatemple.com who provide better support with clients and have better tools for monitoring CPU usage. As well as allowing it to be burstable, and giving a monthly allotment rather than daily, to give breathing room for a good Digg effect and not just shut you down.
Or if you require a bit more, I don’t think http://iweb.com ’s $69 budget dedicated server can be beat. They already keep several large Webcomic sites happy and if you can find a fellow creator to share the server, that’s only $35 each.
andrew says:
November 29th, 2008 at 9:48 pm
I want to second the idea of a VPS. They guarantee you a certain amount of CPU resources - not as much as a dedicated server, but so much more than shared, especially if the shared host is embarrassingly oversold.
Looking at the stats on VPS offerings, it may seem like you are not getting as much in terms of storage, bandwith etc, but the amount you get from a shared hosting is comically more than most people will ever need.
Slicehost seems pretty great, but the thing to think about there is that you have to manage the server yourself. They install the OS, but that’s about it. You need to configure, install (and maintain) apache, mysql, email, php and whathaveyou. While it isn’t an impossible task, it’s probably more that you want to deal with. Other VPS providers give you a more complete setup, and will have some kind of control panel set up to ease management tasks.
Another thing to maybe think about is something like mediatemple’s grid server. Their ‘gs’ service is shared hosting but they have a backend that is set up to deal with large spikes in traffic and CPU usage. They won’t shut you down (and allegedly won’t even slow down) if you suddenly get dugg/etc (but they will charge you overages).
I would be neat to see someone set up something entirely in the cloud - like Amazon’s EC2. It would be interesting to see how their pay-for-exactly-what-you-use approach compared to regular hosting for a medium-large webcomic.
andrew says:
November 29th, 2008 at 10:38 pm
tyler - it would be good to know what kind of things you would do in phpmyadmin to optimize and/or clean up a database.
It would also be neat to get an idea of where various webcomic sites are hosted - both big and large. I guess we all know now that kris hosts everything at dreamhost. Where does pvp live? penny arcade? evil inc? sheldon? goats? diesel sweeties? where did octopus pie end up? Don’t know whether that’s one of those things people share, but it would be educational.
Dave Kellett says:
November 29th, 2008 at 11:08 pm
Great write-up, Kris. Thanks for putting it together.
And Andrew: Sheldon’s at Dumbrella Hosting. Happily so.
andrew says:
November 30th, 2008 at 3:06 am
Thanks Dave, and dumbrella is reselling hosting from voxel(?). That seems like it must be a pretty heavy-duty solution. Especially if project wonderful is running there as well.
jay says:
November 30th, 2008 at 5:32 pm
yeah chris, any chance you’ll ever release the script you use on Chainsawsuit and F Chords? If you could that would be great, but understand if yo rather not.
I think comicpress is great, but I don’t need all it’s stuff … I just need a simple script that can make multiple pages for me.
Thanks,
Jay
Krishna says:
November 30th, 2008 at 7:15 pm
Great article, Kris. I wish I had some of this info before my site got walloped a few weeks back. Hopefully the worst has passed, and now that I have WP SuperCache installed, it will be smooth sailing. And thanks for the heads up about IntenseDebate. I’m going to check that out now.
Garrett Williams says:
December 1st, 2008 at 6:16 am
@Andrew: There’s actually a command in PHPMyAdmin called Optimize. I’ve had to use it once before when my site was unbearably slow.
tpiro says:
December 1st, 2008 at 8:52 am
I’m also using Intense Debate, and I wholeheartedly endorse it. It has been fantastic for my webcomic, especially because I have a handwritten site and wasn’t sure how to add commenting. Intense Debate was easy to implement, even in spite of my clunky coding.
Fleen: Enjoy Our Semi-Abusive Opinion Mongering » On Hosting, With Your Host, Kris Straub says:
December 1st, 2008 at 7:48 pm
[...] solutions, so Straub has a handy primer on getting ahead of the CPU curve over at Webcomics.com. Go check out his mailsack for all the dirt. Short form — you may not be consuming excess resources now, but you will [...]
Kris Straub says:
December 1st, 2008 at 10:35 pm
Another benefit to IntenseDebate is, on their site, communities are searchable, so there is the possibility that people who don’t even know about your comic will get drawn into a conversation on your site. Correct me if I’m wrong, ID users, but my commenting went up by like 33% by switching to ID.
Chronillogical - a webcomic about time traveling grad students - updates tues/fri » Archive » Some Site Updates says:
December 3rd, 2008 at 3:03 pm
[...] on webcomics.com, Kris Straub recommended a comment management system called IntenseDebate. I figured I’d give it a go, because [...]
Dr. Mike Wendell says:
January 6th, 2009 at 6:08 pm
I have to disagree with the use of Intense Debate. It’s now being an Automattic product is why. Matt Mullenweg has shown time and time again that he is perfectly willing to use Akismet, another Automattic product, as a censorship tool. With a central commenting tool, it makes it even easier for him to do so.