APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

What a difference a (static) page makes

© February 2009 Anthony Lawrence

As convenient as it is to drive pages with cgi scripts, I had to partially give up on that because this shared web server just couldn't handle all the forks. That's not the fault of the hosting company; it's just that I've been getting too much traffic now and then. So today I began converting some pages to static pages - no dynamic content except for the ads.

Of course I didn't do this manually - I wrote Perl scripts to handle the work. However, I did it partially manually because I wanted to take this opportunity to update meta tags where needed. The scripts I wrote would show me the current tags and give me the choice of editing them or just doing the conversion. I spent a few hours on this and converted 77 files to static pages.

Just 77 out of more than 13,000? How's that going to help? It will help more than you might think: those 77 pages accounted for more than half of all traffic here last month. Just converting those will cut the number of cgi-bin forks in half. I can actually see that instantly in "w" - I haven't seen such low load averages in years!

This conversion does mean that I had to give up on the fly counting of page views.. that's not so important. I like to know that information, but it's not critical. I can live without it. Other than that, everything should look pretty much the same and will load faster when we're getting pounded on a little. That's worth the effort. I'll slowly convert other pages as I have some other reason to edit them.. I'll probably never get to 100% static but I don't need to right now anyway.

So this gives me some breathing room - we can grow a little bit more before I have to move off shared hosting.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> What a difference a (static) page makes


Inexpensive and informative Apple related e-books:

Take Control of the Mac Command Line with Terminal, Second Edition

Photos for Mac: A Take Control Crash Course

Take Control of Automating Your Mac

Take Control of Parallels Desktop 12

iOS 8: A Take Control Crash Course

More Articles by © Anthony Lawrence

Sat Feb 14 01:24:12 2009: 5409   MikeHostetler

I'm glad that it worked for you. It's better in the long run than mod_perl -- and perhaps easier to do, too.

But mod_perl isn't a bad idea overall, though.

Sat Feb 14 01:27:12 2009: 5410   TonyLawrence

I actually have a few parts of this running under mod_perl but I had never gotten to fixing up the main code - every time I even thought about it I got a headache.. :-)

This will keep me going for a bit..


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

There are two ways to write error-free programs; only the third one works. (Alan Perlis)

Linux posts

Troubleshooting posts

This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode