Test stressing OpenSolaris with MySQL

Over the last months I have seen some impressive presentations about Open Solaris, and I wanted to give it a try.

The live CD provided with opensolaris 2008.05 is very easy to install, and so I set it up in a virtual machine.

The environment looks familiar for a seasoned Linux user, and thus I decided to use it as a test bed for my MySQL Sandbox, which includes a test suite that lets you run a complete test with little effort.

Well, little effort for you, maybe, but not for the operating system. The test puts a lot of stress on the operating system, as you can see from this picture.

Running a complete test for a single version (1 single server + 3 replicated, + 3 circular, + 3 multiple, + 1 custom group = 11 servers) is already demanding. But since in my Mac I dare run the test with 7 concurrent versions for a total of 77 instances of MySQL, and I have still memory to spare, I ran a test with 2 versions on 2 virtual machines, one with Ubuntu 8 and one with Open Solaris.

I am sorry to say that opensolaris did not fare well with this test. The Linux virtual box, with 512 MB of RAM, ran 22 MySQL instances without trouble. The opensolaris box, with 1 GB of RAM, ran out of memory after 18 instances.

Nothing to be afraid of, though. From this negative test I got some useful experience. I asked for help in the opensolaris forums, and I got quick and smart advice from an active and vibrant community (thanks folks!). I haven't solved the problem, but I got enough information to file a proper bug report. According to someone in the forum, that's not even a bug, but the expected way of opensolaris of dealing with memory allocation requests, which is allegedly safer than Linux.

I am not in a position to judge who's right, but perhaps someone in the audience is better qualified to provide an objective answer to this problem. For now, I will just lean back in my chair and wait for comments.

UPDATE It looks like it's more a Linux than a Solaris fault. If you set vm.overcommit_memory=2 in sysctl.conf, as suggested in the comments, Linux will fail even earlier than opensolaris.

Comments:

"This page validates as XHTML 1.0"

Umm, no it doesn't.

And even if it did, it is being served as text/html. And if it \*was\* being served as application/xhtml+xml, it wouldn't display in Firefox as it has validation errors. And even if it didn't have validation errors, it wouldn't display in IE as IE doesn't understand XHTML. Moral: stick with HTML4.01.

See http://hixie.ch/advocacy/xhtml

Oh, and OpenSolaris did just fine, it is working as designed. Unlike Linux, Solaris refuses to let you allocate memory you don't have. Linux allows you to allocate whatever you like, and falls over at some random point in the future. Which behaviour would you prefer on a production system?

Posted by Standards Shark on July 04, 2008 at 07:12 PM CEST #

are you willing to try your tests again with a little tweak to your linux?, disable memory overcommit, add the following to sysctl.conf and then run sysctl -p

## Disable Memory Overcommit ##
vm.overcommit_memory = 2

also, were you doing something other than leaving the mysql servers run?

Posted by nacho on July 04, 2008 at 09:10 PM CEST #

Standards shark,
you are barking at the wrong tree. The HTML is served by the Apache Roller Weblog (see http://blogs.sun.com), which does just fine in Firefox.

Posted by Giuseppe Maxia on July 05, 2008 at 12:54 AM CEST #

Nacho,
Thanks. You proved your point. Linux fails even earlier than Solaris with vm.overcommit_memory=2

Giuseppe

Posted by Giuseppe Maxia on July 05, 2008 at 01:06 AM CEST #

Did Linux fall over earlier with the same amount of memory as OpenSolaris (1GB), or still at 512MB?

Posted by Mark Leith on July 05, 2008 at 03:59 AM CEST #

Mark,
in both cases, I compared with the same amount of memory.
With 512 MB, Linux fails at 7 instances, opensolaris at 11. With 1 GB, Linux fails at 12 instances, opensolaris at 18.

Giuseppe

Posted by Giuseppe Maxia on July 05, 2008 at 04:12 AM CEST #

want to try something even cooler? if you have time you should try setting overcommit back on in linux and try stress testing all your mysql servers at the same time, you might need more than 2 clients.
keep your eyes on /var/log/messages and you might see why you would either want to disable overcommit or stick to solaris

Posted by nacho on July 07, 2008 at 07:57 PM CEST #

Now here's a dilemma. In a production environment, you'd want to turn off overcommit because it's not very nice to have your database server shut down by the oom killer. On the other hand, you'd have to be 100% certain that every application you're running can actually handle an out of memory situation. Because Linux overcommits by default, many OSS developers tend to ignore the possibility of malloc returning zero instead of the address of a memory block...

Posted by Danny on July 15, 2008 at 02:15 AM CEST #

Post a Comment:
Comments are closed for this entry.
About

Giuseppe Maxia

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today