jeffr_tech ([info]jeffr_tech) wrote,
@ 2007-02-20 16:27:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Benchmarking with sysbench.
I did some tests to compare Linux vs FreeBSD using mysql and sysbench.

This graph shows fedora core 6 vs freebsd bleeding edge in cvs 7.0. The test is sysbench with the following parameters:

sysbench --test=oltp --num-threads=${i} --mysql-user=root --max-time=60
--max-requests=0 --oltp-read-only=on run

Both operating systems are installed on the same machine on different partitions on a large raid array. The machine has 8 2ghz opteron cores on 4 dies with 16gb of ram. Both are running mysql 5.0.x where x is within about 3 of each other. I'm using the rpm from fedora and the freebsd package from ports.

Here is the sysbench output as .out files and the linux and freebsd my.cnf files:
linux.out
linux.cnf
bsd.out
bsd.cnf

To my knowledge the configuration files only differ in paths. FreeBSD without this cnf file ran at half the speed. I suspect the default runs with very few threads. Kris Kennaway has a more complete set of tests on a similar machine that show the results of a recent change I made (called filedesc below) that fixed some significant problems. The other specifiers are various patches from other developers. I haven't tested those on my machine.

holycrap.png

My graph shows that linux gets a slightly higher peak but has some horrible scalability problem after 1 thread per cpu. I fully expect someone in the audience to raise their hand and point out the kernel parameter I need to tweak to fix this. Any other suggestions on the database config files or other interesting tests to run are welcome. I'm going to get some more FreeBSD patches committed over the next few weeks so the best lines from holycrap.png are available in cvs.

At a minimum I hope this will end up showing we are performance competitive with Linux on moderately sized machines now that our SMP effort is maturing. I'm the first to admit it's been behind for some time.



Page 1 of 3
<<[1] [2] [3] >>

(134 comments) - (Post a new comment)

Nice!
(Anonymous)
2007-02-21 01:48 am UTC (link)
That looks awesome, thanks and good work! I'd like to see them done with the same version of MySQL in light of this post:

http://www.mysqlperformanceblog.com/2007/01/03/mysqlinnodb-scalability-tests-after-fix/

which implies that some attempts at improvement have been done. Particularly would like to see 5.0.32bk vs 5.0.27 (currently the latest stable) and vs. 5.0.20a.

Would also be nice to see PostgreSQL benchmarks.

Anyway, that makes me really happy, thanks!

Steve

(Reply to this) (Thread)

Re: Nice!
(Anonymous)
2007-02-21 02:40 am UTC (link)
FYI my FreeBSD system was running the 5.0.33 server (latest from ports) and 5.0.27 client.

-Kris

(Reply to this) (Parent)

Re: Nice! - (Anonymous), 2007-04-17 11:13 am UTC
Re: Nice! - [info]newz_top, 2008-01-02 06:49 pm UTC
Re: Nice! - [info]info_link, 2008-01-11 10:15 am UTC
Re: Nice! - [info]info_link, 2008-01-11 10:41 am UTC
Re: Nice! - [info]youtubeli, 2008-02-01 02:08 am UTC
(no subject) - [info]bunnybovun, 2008-08-03 04:33 pm UTC
(no subject) - [info]fionamacklamor, 2008-08-10 09:18 pm UTC
(no subject) - [info]victorweatherf, 2008-08-10 09:24 pm UTC
(no subject) - [info]oscarmerilain, 2008-08-10 10:30 pm UTC
(no subject) - [info]jeromeminar, 2008-08-10 10:42 pm UTC
(no subject) - [info]taylormallard, 2008-08-10 11:39 pm UTC

(Reply from suspended user)

(Reply from suspended user)
What versions
[info]peter_zaitsev
2007-02-21 10:55 am UTC (link)
What does "Both are running mysql 5.0.x where x is within about 3 of each other" suppose to mean ?

Which exactly versions did you use on Linux and BSD ?

In 5.0.33 serious changes regarding scalability were done so if you're comparing 5.0.27 vs 5.0.33 or something similar it can show misleading results

(Reply to this) (Thread)

Re: What versions
[info]sniket
2007-02-21 11:22 am UTC (link)
According to www.freshports.org the latest versions of mysql-server and mysql-client are 5.0.33. As you can see here http://www.freshports.org/databases/mysql50-server/ and here http://www.freshports.org/databases/mysql50-client/ Both ports were added on Feb. 4. Dunno about the Fedora versions though..

(Reply to this) (Parent)

Re: What versions - (Anonymous), 2007-02-22 06:04 am UTC
Re: What versions - [info]jeffr_tech, 2007-02-22 06:07 am UTC
Re: What versions - (Anonymous), 2007-02-22 12:35 pm UTC
Re: What versions - (Anonymous), 2007-02-24 01:56 am UTC
Re: What versions - [info]sniket, 2007-02-24 03:23 am UTC
Re: What versions - (Anonymous), 2007-02-24 06:02 am UTC
Re: What versions - [info]sniket, 2007-02-24 02:39 pm UTC
Re: What versions - (Anonymous), 2007-02-24 09:53 pm UTC
(no subject) - [info]earletalanda, 2008-08-12 11:55 am UTC

(Reply from suspended user)
Nice work
[info]drewunwired
2007-02-23 12:58 am UTC (link)
A couple of questions...

Does the run time have any effect on the results?

Also, are you using the stock FC6 kernel? I'm curious to see if the vanilla (2.6.20) kernel would fare any better or worse.

(Reply to this) (Thread)

Re: Nice work
(Anonymous)
2007-02-24 06:10 am UTC (link)
Run time doesn't really affect things. 2 minutes is a long enough averaging time that variance between runs is very low.

The same effect is seen in the vanilla 2.6.20.1 kernel.

(Reply to this) (Parent)

(no subject) - [info]michaelhartz, 2008-08-06 04:16 am UTC
(no subject) - [info]tyronlarthaud, 2008-08-10 09:52 pm UTC
(no subject) - [info]gaylordhendon, 2008-08-10 10:00 pm UTC
(no subject) - [info]delpape, 2008-08-11 12:06 am UTC
(no subject) - [info]chaunceyrincon, 2008-08-11 02:37 am UTC

(Reply from suspended user)

(Reply from suspended user)

[info]diegocg
2007-02-23 01:23 am UTC (link)
Could you open a bug (including dmesg, hardware description, etc) at bugzilla.kernel.org? (needs registration, sorry :)

(Trying 2.6.20 or newer versions of the kernel and/or mysql would help too)

(Reply to this) (Thread)


[info]giuseppehiggin
2008-08-10 09:01 pm UTC (link)
Don't you need a kernel newer than 2. 4. 20 (or a patched 2. 4. for ACPI thermal support. . 05. Technical Discussion lm_sensors on IA64 machines.

(Reply to this) (Parent)

(no subject) - [info]haileychaffee, 2008-08-10 09:24 pm UTC

[info]kernelslacker
2007-02-23 03:57 am UTC (link)
Which kernel version were you running ? The one that came with FC6, or the latest update ?
The 2.6.18 that came with the release originally had some debugging options left enabled. In the subsequent 2.6.19 updates, I split them out into a separate kernel-debug package, leaving the production variant more tuned for, well.. production.

If you've other questions, feel free to catch me on freenode/oftc where I'm 'davej'.

(Reply to this) (Thread)


[info]asianlevit
2008-08-10 09:07 pm UTC (link)
Anyway, there were some updates as soon as the machine came up that wanted a reboot, and as the machine was going down for that, I noticed an error: Code: Jan 10 jimmy kernel: kobject_add failed for vcsa1 with -EEXIST, don't try to register things with the same name in the same directory.

(Reply to this) (Parent)

(no subject) - [info]mileschantler, 2008-08-10 10:06 pm UTC
(no subject) - [info]raymontizarde, 2008-08-12 12:17 pm UTC

(Reply from suspended user)

(Reply from suspended user)

(Reply from suspended user)

(Reply from suspended user)
Try with OpenSolaris also.
(Anonymous)
2007-02-23 08:40 am UTC (link)
Hello there,

Congratulations for your post. Very nice indeed. Its only missing one of the most used operating systems for big systems, that is OpenSolaris. Can you add OpenSolaris 10 to your test? That would be really great! :)

Cya

(Reply to this) (Thread)

Re: Try with OpenSolaris also.
[info]jeffr_tech
2007-02-23 10:12 pm UTC (link)
I will consider trying opensolaris as I have time. Is it freely available? I confess I don't know much about it.

(Reply to this) (Parent)(Thread)

Re: Try with OpenSolaris also. - (Anonymous), 2007-02-24 12:28 am UTC
(no subject) - [info]jessicabyvot, 2008-07-11 01:54 am UTC
(no subject) - [info]mickyhirav, 2008-08-03 05:04 pm UTC
(no subject) - [info]raultowheed, 2008-08-10 11:02 pm UTC

(Reply from suspended user)

[info]norguhtar
2007-02-23 11:29 am UTC (link)
Database table in test is MyISAM ?

(Reply to this) (Thread)


[info]jeffr_tech
2007-02-23 10:06 pm UTC (link)
Yes, I believe so. Do you know how to test other table types?

(Reply to this) (Parent)(Thread)

(no subject) - [info]norguhtar, 2007-02-24 06:47 am UTC
(no subject) - [info]_dyr, 2007-02-25 08:17 am UTC
(no subject) - [info]norguhtar, 2007-02-25 09:35 am UTC
(no subject) - [info]_dyr, 2007-02-25 11:06 am UTC
(no subject) - [info]norguhtar, 2007-02-25 11:37 am UTC
(no subject) - [info]bluesmoon, 2007-02-26 12:28 pm UTC
(no subject) - [info]_dyr, 2007-02-27 10:15 am UTC
(no subject) - [info]bluesmoon, 2007-02-27 11:46 am UTC
(no subject) - [info]natmaka, 2007-02-24 09:10 am UTC
(no subject) - [info]bodun, 2007-02-25 12:56 pm UTC
(no subject) - [info]natmaka, 2007-02-25 02:38 pm UTC
Good, BSD !
(Anonymous)
2007-02-23 07:37 pm UTC (link)
It looks like FreeBSD is catching up with Linux regarding SMP. Up to 4 threads (which would mean 4 cores in use) it scales almost identically as Linux. From 4 to 8 it's still a bit behind, though.

The Linux drop with more than 1 thread per core is obviously a bug. I've run the test on a single core machine and it performs the same with 1 thread per core as with 2,4,8 and even 16 threads per core.

Great to see this results for FreeBSD. I hope that when it becomes stable it will still perform almost as good as here.

(Reply to this) (Thread)

Re: Good, BSD !
[info]jeffr_tech
2007-02-23 10:11 pm UTC (link)
Yes, we definitely have some problem from 4 to 8 threads. I'm trying to understand that now.

I don't think it's fair to say that the linux drop off is obviously a bug. It may very well be a bug, and it may even be likely that it's a bug. However, if there is contention on some lock, 8 cpus will show it and 1 cpu will not. It's not as simple as just the number of threads. It's the number of threads executing simultaneously that matters.

Furthermore, this isn't an unstable patch, or even a very big one. It just changes the type of lock we're using to protect one datastructure. It's already stable, so this is the perf we have. ;)

(Reply to this) (Parent)(Thread)

Re: Good, BSD ! - [info]kernelslacker, 2007-02-24 07:20 am UTC
Re: Good, BSD ! - [info]jeffr_tech, 2007-02-24 08:49 am UTC
On the Linux side of things - [info]natmaka, 2007-02-24 09:24 am UTC
Re: On the Linux side of things - [info]sb16, 2007-02-24 10:45 am UTC
Re: On the Linux side of things - [info]natmaka, 2007-02-24 10:53 am UTC
Re: On the Linux side of things - [info]jeffr_tech, 2007-02-24 06:49 pm UTC
Re: On the Linux side of things - [info]natmaka, 2007-02-25 02:36 pm UTC
Re: On the Linux side of things - (Anonymous), 2007-02-25 05:28 pm UTC
(no subject) - [info]scottiewahls, 2008-08-10 10:43 pm UTC
(no subject) - [info]tonyfowlke, 2008-08-11 03:14 am UTC

[info]ospf_ripe
2007-03-03 02:23 pm UTC (link)
Can you share scripts used to parse sysbench output and plot graph?

(Reply to this) (Thread)


[info]7wrc
2007-05-02 03:53 am UTC (link)
Also intrested in this.

(Reply to this) (Parent)

(no subject) - [info]camikohij, 2008-07-10 11:12 pm UTC
(no subject) - [info]billvaliant, 2008-08-10 09:24 pm UTC
Anton Blanchard's Findings
(Anonymous)
2007-03-14 08:20 pm UTC (link)
Hi,

looks really interesting. Did you already read Anton Blanchard's theory about this and a possible fix?

http://ozlabs.org/~anton/linux/sysbench/

Best Regards,
Heiko

(Reply to this) (Thread)

Re: Anton Blanchard's Findings
[info]deludedian
2008-01-20 03:09 pm UTC (link)
Was there any follow up to this, other than the address listed?

Thanks

Charity cds

(Reply to this) (Parent)


[info]selenation
2007-05-07 11:37 pm UTC (link)
It's interesting...

(Reply to this)

Scalability Report Quad Intel Xeon (4 Cores on two dies)
[info]komputnik
2007-06-22 11:53 pm UTC (link)
Hi, these are the results of my sysbench Test with an 2 x Quad Core Intel Xeon with 12 GB RAM + 2 MPT SAS 32 GB Disks.http://jeffr-tech.livejournal.com/5705.html
jeffr_tech: Benchmarking with sysbench. Mysql resides on the half of the second disk. slide is 15GB. I used your sched_smp patch and the current cvs version of the kernel (7.0 CURRENT). The generic kernel didn't perform in any way. The peak was ca. 500 Trans/s on 8 threads. Awful i thougt, because my last test was on the same machine using debian lenny with selfported glibc6 and kernel 2.6.21.5. The peak was about 2800 Trans/s with 8 threads. Than the performance dropped to 1200/Trans/s on 8 threads and finally dropped by 50 Trans/s + 2 Threads. Means on 10 threads there were about 1150 and so on. It dropped not that way as the 2.6.18 kernel. Now i installed 7.0 from scratch and pulled your sched_smp patch. Kernel config and sysbench out could be provided if desired. It's a RX200 S3 Server for testing purposed.

Results: (Pickload=1)
Threads: Trans:
1 transactions: 31167 (519.44 per sec.)
2 transactions: 58610 (976.82 per sec.)
4 transactions: 108441 (1807.30 per sec.)
6 transactions: 170797 (2846.54 per sec.)
8 transactions: 145951 (2432.42 per sec.)
10 transactions: 134550 (2242.39 per sec.)
12 transactions: 130384 (2172.94 per sec.)
14 transactions: 128112 (2108.81 per sec.)
16 transactions: 128462 (2140.84 per sec.)
18 transactions: 116319 (1938.51 per sec.)
20 transactions: 113786 (1896.24 per sec.)

Results: (Pickload=0)

Threads: Trans:
1 transactions: 33086 (551.43 per sec.)
2 transactions: 62800 (1046.63 per sec.)
4 transactions: 108037 (1800.55 per sec.)
6 transactions: 128630 (2143.77 per sec.)
8 transactions: 189012 (3150.06 per sec.)
10 transactions: 200474 (3341.08 per sec.)
12 transactions: 200240 (3337.18 per sec.)
14 transactions: 199438 (3323.75 per sec.)
16 transactions: 196266 (3270.82 per sec.)
18 transactions: 193093 (3217.96 per sec.)
20 transactions: 188099 (3134.74 per sec.)

I could only say ..... Very impressive.
Thanks for your effort to build high scalability DB Systems.
Kind Regards

Komp.

(Reply to this) (Thread)

Re: Scalability Report Quad Intel Xeon (4 Cores on two dies)
[info]jeffr_tech
2007-06-23 06:17 am UTC (link)
Hey,

Thanks very much for verifying the results. There has been some problem with SCHED_SMP on some machines. I'm surprised to see that pickload=0 is faster for you.

I intend to update my schedsmp patch again. Would you be willing to test and give feedback again?

(Reply to this) (Parent)(Thread)

Re: Scalability Report Quad Intel Xeon (4 Cores on two dies) - [info]komputnik, 2007-06-23 09:30 am UTC
Re: Scalability Report Quad Intel Xeon (4 Cores on two dies) - (Anonymous), 2007-06-29 11:50 am UTC
Re: Scalability Report Quad Intel Xeon (4 Cores on two dies) - [info]jeffr_tech, 2007-06-29 06:47 pm UTC
Perf Report with vmware esx (mysql 4.1.22) little off topic
[info]komputnik
2007-07-03 05:31 pm UTC (link)
Hi,
i now used tcmalloc + glibc 2.6 + mysql 4.1.22 (My Production environment) and skipped innodb which we don't use at all. Linked with tcmalloc a vmware guest with following config left good results.
Config: (Hardware host same as freebsd machine.above bsd results).
Guest: debian lenny/amd64 + glibc 2.6 + mysql 4.1.22 + tcmalloc+kernel 2.6.21-1-amd64 (debian unstable kernel)
2048 MB RAM/4 CPU'S (Max on vmware esx).
While running the tests, all 4 cpu's went nearly to the max and ran at 10GHZ. (Perf Plott).
Rootfs: NFSROOT (NAS Storga. DD of 100 MB from /dev/zero about 50 MB/s).
Mysql: On nfsroot without locking. (rsize=32768,wsize=32768). MTU always 1500 on vmware.
Config: Linux.cnf (from above).

Threads: 1 transactions: 28101 (468.34 per sec.)
Threads: 2 transactions: 50290 (838.16 per sec.)
Threads: 4 transactions: 192921 (3215.28 per sec.)
Threads: 6 transactions: 211314 (3521.79 per sec.)
Threads: 8 transactions: 232696 (3878.14 per sec.)
Threads: 10 transactions: 235597 (3926.43 per sec.)
Threads: 12 transactions: 248415 (4140.05 per sec.)
Threads: 14 transactions: 244441 (4073.84 per sec.)
Threads: 16 transactions: 255094 (4251.34 per sec.)
Threads: 18 transactions: 249555 (4159.02 per sec.)
Threads: 20 transactions: 253764 (4228.71 per sec.)
Threads: 22 transactions: 251078 (4184.14 per sec.)
Threads: 24 transactions: 257100 (4284.61 per sec.)

Kind Rgds.
Komputnik

(Reply to this)

(Reply from suspended user)

(Reply from suspended user)

[info]bymst
2007-12-28 12:50 am UTC (link)
Good verifed mail thanks you

(Reply to this) (Parent)

(no subject) - [info]bymst, 2007-12-28 12:50 am UTC
böyle adaletin .)
[info]by_soul
2007-12-28 11:28 am UTC (link)
thanks you very high work.. cesurturk saolasın.)

Youtube, rize, film izle

(Reply to this)

thx
[info]oyunlar
2007-12-29 12:27 am UTC (link)
Does the run time have any effect on the results?

Also, are you using the stock FC6 kernel? I'm curious to see if the vanilla (2.6.20) kernel would fare any better or worse.
oyun indir

(Reply to this)

(Reply from suspended user)

[info]sessiz
2008-01-06 12:43 am UTC (link)
thanks.. It's working. perfect

Youtube

(Reply to this) (Thread)


[info]freegames99
2008-09-27 07:47 am UTC (link)
Yes it is working perfect.Free Games

(Reply to this) (Parent)

youtube
[info]youtubeea
2008-01-15 02:10 pm UTC (link)
youtube
youtube

Does the run time have any effect on the results?

(Reply to this)

looks great
[info]deludedian
2008-01-20 03:14 pm UTC (link)
Looks great. It looks from the results that you weren't running sysbench in batch mode with a delay setting. Is this correct?

Charity cds

(Reply to this)

youtube
[info]aramana
2008-02-08 05:30 pm UTC (link)
youtube youtube

(Reply to this) (Thread)

Re: youtube
[info]deludedian
2008-03-26 06:05 pm UTC (link)
Sorry, I missed that.

(Reply to this) (Parent)

thanks
[info]youtubeizle
2008-02-16 09:24 pm UTC (link)
thanks you
youtube

(Reply to this)

thanks
[info]sirganisch
2008-02-29 07:24 pm UTC (link)
Handbags

(Reply to this)

(Reply from suspended user)

(134 comments) - (Post a new comment)

Page 1 of 3
<<[1] [2] [3] >>

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…