Dear all,
I am a hobbyist using FreeBSD on the desktop for my daily computing needs and for two websites I work on during my free time.
I have been reading a few things on virtualization and have found jails to be very useful for my particular needs. However, working in a big environment (I work as a UNIX operator in a bank) has let me thinking on commercial solutions.
Solaris is fading away and with it zones/containers, which are derived from jails, too. Since I have a few pc's at home I decided to check some different solutions aside of jails. The first into my home made test is VMWare. Before you read any longer, things to consider:
My first impression is although I see the advantages of this kind of software (I mean VMWare) the vm's run much slower than on bare metal with not so powerful hardware. My second impression is I have made some mistake somewhere (or maybe I lack some knowledge) because FreeBSD outperforms CentOS 7 by a lot when benchmarking the wordpress sites.
I have used siege as follows:
For FreeBSD:
Transactions: 10716 hits
Availability: 96.51 %
Elapsed time: 179.48 secs
Data transferred: 163.70 MB
Response time: 1.91 secs
Transaction rate: 59.71 trans/sec
Throughput: 0.91 MB/sec
Concurrency: 113.97
Successful transactions: 10716
Failed transactions: 388
Longest transaction: 74.65
Shortest transaction: 0.00
For CentOS 7:
Transactions: 854 hits
Availability: 99.53 %
Elapsed time: 179.91 secs
Data transferred: 19.40 MB
Response time: 1.78 secs
Transaction rate: 4.75 trans/sec
Throughput: 0.11 MB/sec
Concurrency: 8.44
Successful transactions: 854
Failed transactions: 4
Longest transaction: 14.98
Shortest transaction: 0.00
The FreeBSD vm only reached about 700MB of ram usage while testing and opened three more httpd processes to handle the request. On the other hand the CentOS vm went up to 2.8 GB of ram use and swapped a few MB. It opened four "extra" httpd processes to handle the load. Plus after the test the Linux machine was not responding to commands and new ssh connections failed having to reboot the vm.
I know the results are irrelevant and anyone waiting 70 sc for a webpage to load will be very far away (although 1.91 sc is not that bad). At least as far as the 388 requesters who didn't receive their page. However I cannot explain by any means the performance difference between the two vm's.
Again, both systems play default OS configurations, both websites are equal, testing the same URL (the home page which loads a ton of things), although using different PHP versions. And I imagine the CentOS version being newer should perform at least a bit better than the one in the BSD vm.
Any idea of what have I missed? I've checked everything, from the VM's configuration in VMWare, to the Apache's modules, etc. Everything. And aside different PHP versions they are both on the same page. I even checked if the command was the same. It was.
PS: Sorry for my long post.
I am a hobbyist using FreeBSD on the desktop for my daily computing needs and for two websites I work on during my free time.
I have been reading a few things on virtualization and have found jails to be very useful for my particular needs. However, working in a big environment (I work as a UNIX operator in a bank) has let me thinking on commercial solutions.
Solaris is fading away and with it zones/containers, which are derived from jails, too. Since I have a few pc's at home I decided to check some different solutions aside of jails. The first into my home made test is VMWare. Before you read any longer, things to consider:
- The purpose of this is merely discovery.
- The main goal was/is load the system as much as possible with VMWare playing with 3-4 vm's, all different OS.
- The secondary goal is to see how each different system behaves in this scenario.
- The hardware is an HP Proliant ML110 G7 with 14GB of ram.
- The VMWare version is 6.5 community edition.
- The setup is at the time of writing:
- A vm with FreeBSD 11.1 with one core assigned and 3GB of ram.
- Another vm with CentOS 7 with one core and 3GB of ram.
- A third vm with Solaris 11.3 with one core and 3 gigs of ram as well.
- The BSD and the Linux vm's "play" a wordpress webiste with real data.
- The FreeBSD vm uses stock system configuration plus vmware tools and MySQL 5.7, PHP 5.6, as well as Apache 2.4. The site is configured with the MPM Event module so php-fpm is mandatory.
- The CentOS vm uses similar config but since the stock software offering is much older I set it up to use: Apache 2.4, MySQL 5.7 and PHP 7.1. Again Apache is configured to use the MPM Event module.
- The Solaris machine will be in charge of another website using a different CMS, in this case a Magnolia installation (it's made on Java).
- The load testing software in use is siege and ab (apache benchmark).
- The test came from a jailed environment on an spare laptop I connect from.
- The networking gear is a home router. No more, no less.
- Mind my knowledge is little. Veeeery little.
My first impression is although I see the advantages of this kind of software (I mean VMWare) the vm's run much slower than on bare metal with not so powerful hardware. My second impression is I have made some mistake somewhere (or maybe I lack some knowledge) because FreeBSD outperforms CentOS 7 by a lot when benchmarking the wordpress sites.
I have used siege as follows:
[INDENT]siege -c150 -d10 -t3M URL[/INDENT]
And the results have been:For FreeBSD:
Transactions: 10716 hits
Availability: 96.51 %
Elapsed time: 179.48 secs
Data transferred: 163.70 MB
Response time: 1.91 secs
Transaction rate: 59.71 trans/sec
Throughput: 0.91 MB/sec
Concurrency: 113.97
Successful transactions: 10716
Failed transactions: 388
Longest transaction: 74.65
Shortest transaction: 0.00
For CentOS 7:
Transactions: 854 hits
Availability: 99.53 %
Elapsed time: 179.91 secs
Data transferred: 19.40 MB
Response time: 1.78 secs
Transaction rate: 4.75 trans/sec
Throughput: 0.11 MB/sec
Concurrency: 8.44
Successful transactions: 854
Failed transactions: 4
Longest transaction: 14.98
Shortest transaction: 0.00
The FreeBSD vm only reached about 700MB of ram usage while testing and opened three more httpd processes to handle the request. On the other hand the CentOS vm went up to 2.8 GB of ram use and swapped a few MB. It opened four "extra" httpd processes to handle the load. Plus after the test the Linux machine was not responding to commands and new ssh connections failed having to reboot the vm.
I know the results are irrelevant and anyone waiting 70 sc for a webpage to load will be very far away (although 1.91 sc is not that bad). At least as far as the 388 requesters who didn't receive their page. However I cannot explain by any means the performance difference between the two vm's.
Again, both systems play default OS configurations, both websites are equal, testing the same URL (the home page which loads a ton of things), although using different PHP versions. And I imagine the CentOS version being newer should perform at least a bit better than the one in the BSD vm.
Any idea of what have I missed? I've checked everything, from the VM's configuration in VMWare, to the Apache's modules, etc. Everything. And aside different PHP versions they are both on the same page. I even checked if the command was the same. It was.
PS: Sorry for my long post.