# innodb\_thread\_concurrency / cpu usage

**URL:** <https://forums.percona.com/t/innodb-thread-concurrency-cpu-usage/122>\
**Category:** Other MySQL® Questions\
**Created:** [November 17, 2006, 4:05pm UTC](https://forums.percona.com/t/innodb-thread-concurrency-cpu-usage/122 "2006-11-17T16:05:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmoeller](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@mmoeller](https://forums.percona.com/u/mmoeller)\
**Post date:** [November 17, 2006, 4:05pm UTC](https://forums.percona.com/t/innodb-thread-concurrency-cpu-usage/122/1 "2006-11-17T16:05:55Z")

</div>

Hi,

we have a 4-way dualcore xeon server running mysql 5.0.27 with bufferpool-mutex-patch.

the load is entirely cpu/memory bound, no noticable disk activity.

If i set innodb\_thread\_concurrency to 16 or 32 and simulate a lot of load, i see that the system is overloaded but cpu usage is only at 20%.  
If i set it to unlimited (0), i see cpu is going to 100%, but actually _less_ queries are performed per second.

If i use SHOW MUTEX STATUS, the only mutex heavily used is the main bufferpool mutex, so I guess the concurrency problem is not entirely solved by the patch?

---

<div class="post-metadata">

**Author:** ![vadimtk](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadimtk/32/9528_2.png) [@vadimtk](https://forums.percona.com/u/vadimtk)\
**Post date:** [November 18, 2006, 3:55pm UTC](https://forums.percona.com/t/innodb-thread-concurrency-cpu-usage/122/2 "2006-11-18T15:55:12Z")

</div>

Yes,  
perhaps problem still in buffer pool.

Can you try 5.0-bk ?

[http://dev.mysql.com/doc/refman/5.0/en/installing-source-tre](http://dev.mysql.com/doc/refman/5.0/en/installing-source-tre) e.html

---

<div class="post-metadata">

**Author:** ![Peter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/peter/32/2_2.png) [@Peter](https://forums.percona.com/u/Peter)\
**Post date:** [November 20, 2006, 12:38pm UTC](https://forums.percona.com/t/innodb-thread-concurrency-cpu-usage/122/3 "2006-11-20T12:38:11Z")

</div>

Also,

Can you report how much scalability do you get, ie if you can simulate your workload with 1 thread, 4 threads, 16 threads.

The interesting thing about current official patch is - it scales differently on different platforms and different workloads. For older Xeons it scales quite badly still. New (Woodcrest) Xeons are much better but still it can be far from perfect scalability depending on workload.

I have not had a chance to check on Opteron yet.

---

<div class="post-metadata">

**Author:** ![mmoeller](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@mmoeller](https://forums.percona.com/u/mmoeller)\
**Post date:** [November 20, 2006, 12:48pm UTC](https://forums.percona.com/t/innodb-thread-concurrency-cpu-usage/122/4 "2006-11-20T12:48:45Z")

</div>

The problem is that we only have one 4-way server yet, and i cant take that one offline for a long time (

I will try the 5.0-bk version tomorrow, and tell you if it helped 😉

A diff from 5.0-bk to 5.0.27 shows up a new mutex in buf0buf.h, so i’m quite optimistic.
