September 2008

Apache versus Lighttpd

I've been a big Apache fan since I was able to apt-get install on my Ubuntu box. Lately I've been messing around with different web servers so I thought I'd try out Lighttpd to see how it compared to Apache.

I used Apache Benchmark to run the test. All I did was run

ab -n 5000 http://localhost/

So I just sent 5000 request to localhost. First I ran Apache by itself. Here are the results:

Finished 5000 requests

Server Software: Apache/2.2.8
Server Hostname: localhost
Server Port: 80

Document Path: /
Document Length: 145 bytes

Concurrency Level: 1
Time taken for tests: 3.910033 seconds
Complete requests: 5000
Failed requests: 0
Write errors: 0
Total transferred: 1990000 bytes
HTML transferred: 725000 bytes
Requests per second: 1278.76 [#/sec] (mean)
Time per request: 0.782 [ms] (mean)
Time per request: 0.782 [ms] (mean, across all concurrent requests)
Transfer rate: 496.93 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 30
Processing: 0 0 1.1 0 30
Waiting: 0 0 0.1 0 6
Total: 0 0 1.2 0 31

Percentage of the requests served within a certain time (ms)
50% 0
66% 0
75% 0
80% 0
90% 0
95% 1
98% 2
99% 3
100% 31 (longest request)

 

It wasn't too bad. Now on to Lighttpd

Finished 5000 requests


Server Software: lighttpd/1.4.19
Server Hostname: localhost
Server Port: 80

Document Path: /
Document Length: 145 bytes

Concurrency Level: 1
Time taken for tests: 2.60885 seconds
Complete requests: 5000
Failed requests: 0
Write errors: 0
Total transferred: 2005000 bytes
HTML transferred: 725000 bytes
Requests per second: 2426.14 [#/sec] (mean)
Time per request: 0.412 [ms] (mean)
Time per request: 0.412 [ms] (mean, across all concurrent requests)
Transfer rate: 950.08 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.5 0 31
Processing: 0 0 0.5 0 29
Waiting: 0 0 0.0 0 0
Total: 0 0 0.7 0 32

Percentage of the requests served within a certain time (ms)
50% 0
66% 0
75% 0
80% 0
90% 0
95% 0
98% 1
99% 1
100% 32 (longest request)

If we compare the numbers, it's obvious that Lighttpd did a better job at fulfilling the requests faster, with a higher transfer rate. For now I've switched my server over to Lighttpd. It's only used for torrentflux, vmware, and small testing sites but the switch will definitely free some resources and serve pages more quickly.


Specs

Ubuntu 8.04 Server Edition
512 Mb Ram
1266 Mhz (1.266 Ghz)

 

Waim Server Project

I'm currently working on a project called waim. It stands for Web AIM (AOL Instant Messenger). Right now, it is in an early alpha stage but is coming along nicely.

The goal of this software is to allow anyone to start and run their own "web instant messenger" Web site (like meebo.com or aim express) without any knowledge of programming or coding. All you'll need is an Internet connection, some firewall configuration, and you could start your own site.

Waim is an HTTP server in itself. This means you don't need to find a web host provider who supports sockets or custom software or any of that. It runs from your computer, and handles everything from serving the web pages to connecting to AIM. The pages are fully customizable, allowing you to create a unique service while still using the waim server as the core of your site.

Security is a big issue when it comes to running any type of server. There are internal checks on literally all data sent to waim, ensuring your computer stays safe. There is also administration options allowing you to block users, disable service, and even shut down the server completely. There are only a small number of web pages that are generated per page request, the rest are created when the server is started. This limits the possible entry points to files on the host computer.

Waim is not finished, it is barely even started. Right now the Web server functionality is up and running, but it does not have it's core functions (besides web server) even written yet. I will continue to post updates about waim, and hopefully I will get a demo running so you can see how it's coming along.

Tags:

Google Chrome

chromeGoogle's web browser, "chrome", was released as a beta today. There are a lot of nice features built in, and it's a stable app even for being in beta. The render engine is based off of Web kit, and it has some features from Mozilla making it almost a hybrid of Safari and Firefox.

One of the first things you'll notice is how much of the page is in view. The interface is designed to display more of what you want to see, and less of what you don't need, like status bars and toolbars.

You'll notice that this browser, along with pretty much every new browser, has tabbed windows. But Chrome is different. Each tab has its own environment to exist in, with its own alocation of memory and on its own process. This way, tabs aren't sharing resources. But the best part of it is, if one tab crashes (maybe your game of duck hunt freezes) instead of losing every open tab, only that single tab is lost.

Another feature most modern browsers have is a search box in the upper right corner. If you notice, though, Google Chrome doesn't have one. So where did it go? Just type your search right where you would normally put a URL. Typing opens up searching, bookmarks, and history all in one place.

Some other features it has are

  • Incognito mode - browse without saving history or cookies
  • Import settings - copy your history, passwords, and bookmarks from Firefox right into chrome
  • Simple downloads - a simple download manager at the bottom of the window, no intrusive and new popups
  • V8 engine - Chrome can execute JavaScript much faster, making things like checking your E-Mail much faster
  • Phish protection - Like in Firefox, chrome will alert you if you're on a suspicious web site

Along with the phish protection, Google went ahead and changed the way the current page URL is displayed. It will display the URL in a gray color, and the base URL in black. That way you can see exactly what web site you're on.

chrome url


So is this a Firefox killer? Probably not. As nice as Chrome may be, it won't be replacing my Firefox. There's still no support for add-ons or skins. It also lacks the community that Firefox has. I can see it replacing Internet Explorer, but you never know. It's still in beta, and it's open source. Some great projects could come from it, let's just hope people put it to good use.

Tags: