Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2011 23:07:45 +0100
From:      Mage <mage@mage.hu>
To:        freebsd-questions@FreeBSD.org
Subject:   connection speed (Rails performance)
Message-ID:  <4EE67B31.2080101@mage.hu>

next in thread | raw e-mail | index | archive | help
             Hello,


it is my second attempt to switch from Gentoo to FreeBSD because:

- if you google for FreeBSD you get sexy images of girls in red wear 
(turn safe search off)
- I am a bit tired to upgrade my hardened servers
- zfs supposed to work better and faster

However I'am stuck at the same issue where I gave up half year ago.

After setting up Ruby on Rails 3 (with rvm), Apache22 and Postgres, I 
ran some apache benchmarks and figured out that while FreeBSD wins at 
slow pages, at faster pages FreeBSD (for me) is way slower than Gentoo.

A dynamic page:

Gentoo:
# ab -n 1000 -c 12 http://randi7/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Requests per second:    169.88 [#/sec] (mean)

FreeBSD:
# ab -n 1000 -c 12 http://randi7/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Requests per second:    59.31 [#/sec] (mean)


A static page:
$ echo hello > public/index.html

Gentoo:
# ab -n 1000 -c 12 http://randi7/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Requests per second:    25047.59 [#/sec] (mean)


FreeBSD:
# ab -n 1000 -c 12 http://randi7/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Requests per second:    6160.29 [#/sec] (mean)


The faster the page is generated the bigger the difference is in 
requests per seconds.

I experienced the very same results half year ago at my first attemp to 
migrate to FreeBSD. All tests were done with more or less current 
kernels (both systems). This is a totally fresh install on a different 
computer.

Half year ago I tried all of apache, thin, mongrel, nginx and the 
outcome was same. I guess it might be something with the connection but 
I don't know what. Of course all tests were ran on localhosts.

How could I improve this?

         Mage



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EE67B31.2080101>