DIY Linux HACK - HOW TO optimize your Wordpress Blog, MediaWiki, or any other high load website with Compression!
Well, we did a lot of server hacking before with some MySQL, eAccelerator, and httpd.
There’s a lot of major blogs out there I have checked using Web Page Compression Tool that are not using compression. (For one, I checked John Chow’s blog)
Try to check one of your posts instead of checking your main URL as the tool is funky with root domains. (e.g. Check http://zedomax.com/blog/2008/02/23/never-give-up-especially-your-blog-dude/ instead of http://zedomax.com)
Here’s a screenshow of compression test I did for one of John Chow’s posts:

As you can see, John Chow’s blog does not use compression. As a result, he’s losing out on almost 5 times of bandwidth!!!
With level 9 compression, his site could be loaded on your web browser at 21K instead of the whopping 100K.
Now the compression might not be for all of you with slow CPUs. Our Zedomax.com runs on Quad-CPU server which has a lot of CPU processing power.
Here’s a screenshow of my server under normal load:

As you can see, most of the time, my CPU is idling at 80.8%! That means my CPU is pretty much sitting on its ass instead of doing work for me.
Now, if you have a similar situation, compression will help your site load faster and also bring your load down so you can handle more traffic.
Here’s how to enable compression if you have a dedicated or access to root on your server:
(Most servers have zlib installed, if you don’t have zlib installed, you will have to install that first, you can check it by making a test file and putting <?php phpinfo() ?> and search for zlib)
Add the following lines to your /etc/php.ini:
zlib.output_compression = on
zlib.output_compression_level = 5
and then restart apache! (of course):
httpd -k restart
Now, go check one of your posts on the Compression Test Tool here.

As you can see above, I just compressed one of my blog posts by a whopping 76.1%!
If you are using Super Cache plugin for Wordpress, make sure to go to options and do this too:

Now, your server will run faster since there’s less data being transmitted to your visitors, meaning you save bandwith, time, and most importantly, the ability to handle more traffic.
At 70% increase in bandwidth, that could translate to that many more visitors too as bandwidth is directly proportional to amount of time a visitor stays on your site. (Yes, I did take Calculus in college, I failed miserably before passing.) The less time a visitor takes to load a page on your blog or your site, the more time and bandwidth you have for other visitors.)
I was searching through the web for many ways to use compression for server optimization but I couldn’t find any so I sort put everything together here.
Hopefully, it helps you.
And one more thing, you can also check out this great tutorial on your httpd.conf setup.
You can always check out HOWTO decrease load on your server by 5 times also.
DIY Wordpress HACK - How to decrease the load on your Wordpress blog by 5 factors!

Here’s how to decrease the load on your Wordpress blog by 5 factors! (if you are running a dedicated server)I was digging today for some stuff on digg and noticed this post about Wordpress performance.
Since Zedomax runs Wordpress, I decided to take a look.
Elliott was running only one server yet he claims that he can handle 1,000,000 hits a day on one server!
FYI, Zedomax is running 3 servers now and the load was at about 0.80 to 1.0 on an average day for the HTTP server and 0.60 to 0.80 for the MYSQL server. (The other HTTP server is for the other blogs)
So through Elliott’s suggestions at changing httpd.conf, my.cnf, php.ini, and installing eAccelerator, my load on the server dropped at least 5 times!
The load for the HTTP server is now at about 0.20 for the HTTP server and 0.15 for the MYSQL server.
Bottom Line
If you run Wordpress blogs, make sure to do the suggested changes and you will definitely notice the increased speed of your website loads.
Here’s some additions to the Elliott’s HOWTO for installing eAccelerator.
When I’m trying to execute phpize, I got this:
/usr/local/php/bin/phpize: line 57: aclocal: command not found
This means you don’t have phpize installed on your Fedora. You can install the php-devel which has the phpize in it like this:
“yum install php-devel”
I got this error when I was trying to install the above:
“Check that the correct key URLs are configured for this repository”
So you gotta do this:
Edit /etc/yum.repos.d/fedora.repo and replace the line
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
with:
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
Then when you do “./configure”, if you get an error, you need to install some more tools. (which wasn’t documented)
So I installed Autoconf and Automake by using:
“yum install autoconf”
and
“yum install automake”
This might be basic for an experience linux-er but it took me couple hours to get it so hopefully it will help ya.
Then you can follow the rest of the directions.
Hey thanks Elliott for sharing the information with the world. I really appreciate this, you made my websites run faster!















