Test stressing OpenSolaris with MySQL
By Giuseppe Maxia on Jul 04, 2008
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.