views:

94

answers:

3

I have developed 3 simple blogging system in PHP/Apache/Mysql, Python/Ngix/Postgresql and in Erlang/Yaws/Mnesia.

How can I measure performance on my server for this 3 different configuration ?

+2  A: 

When you say you want to measure performance I assume you mean load testing, response times, that kind of thing.

If so you can use ab (apache bench). Its a little program that's usually available on linux and, I believe, macs. You give it a url, tell it how many times to request it and optionally give it some other parameters. Its sending http requests so it doesnt matter what the server code is implemented in so you can use it to test all 3 systems.

Here's a link with more information on ab

ab will give you a good idea of how many requests per second each system can put through. If you want a single metric to compare your 3 systems that's a pretty good one.

To discover what element of the server is limiting performance (cpu, database access, bandwidth) you'll need to look at tools that are on the server instead of on the client machine. What tools you use there will depend on the operating system and potentially will vary depending on what language/tools you used to implement the server code.

andyjdavis
+1  A: 

Also you can try to use httperf (http://www.hpl.hp.com/research/linux/httperf/).

W55tKQbuRu28Q4xv
+4  A: 

I would suggest you to have a look at Tsung.

Reading from their home page:

It can be used to stress HTTP, WebDAV, SOAP, PostgreSQL, MySQL, LDAP and Jabber/XMPP servers. Tsung (formerly known as IDX-Tsunami) is a free software released under the GPLv2 license.

The purpose of Tsung is to simulate users in order to test the scalability and performance of IP based client/server applications. You can use it to do load and stress testing of your servers. Many protocols have been implemented and tested, and it can be easily extended. WebDAV, LDAP and MySQL support have been added recently (experimental).

It can be distributed on several client machines and is able to simulate hundreds of thousands of virtual users concurrently (or even millions if you have enough hardware ...).

Tsung is developed in Erlang, an open-source language made by Ericsson for building robust fault-tolerant distributed applications.

Also, for your Erlang bit, you might find some hints and tools in the profiling section of the Erlang efficiency guide.

Roberto Aloi