jeffr_tech ([info]jeffr_tech) wrote,
@ 2008-03-22 21:41:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
MyISAM performance is terrible in FreeBSD 7.0 due to the user-space pthread_rwlock implementation. Just a word of warning if you intend to deploy a database server based on 7.0. I am certain we will have this fixed in 7.1. It will most likely be in CURRENT in a week or two.


(Post a new comment)


[info]sas_spidey01
2008-03-24 03:19 am UTC (link)
The only systems I have access to that uses a database for everything runs off RHEL :\

Wouldn't any performance issue with the pthread_rwlock implementation effect any program that uses Pthreads for a lot of rwlocks? I'm not very bright on POSIX Threads but I could understand ISAM based storage engines having great need for such things just as much as any thing that works that way.

(Reply to this)(Thread)


[info]jeffr_tech
2008-03-24 04:01 am UTC (link)
It depends on how much contention there is on the rw lock and how long it is held for. If it's held for longer periods the inefficiency in acquire is less of an issue. However, MyISAM seems to have a small number of these locks which it holds over very short periods compounding the issue. I'm not saying MyISAM is at fault, its use case is totally valid, it just happens to be the pathological case for this implementation.

In any event, I have a bandaid solution at the moment which largely solves the problem but we're working on something to entirely solve the problem.

Also, I believe most applications just use pthread_mutex_*. That's why we didn't see this with innodb. It doesn't make extensive use of rwlocks.

(Reply to this)(Parent)(Thread)


[info]sas_spidey01
2008-03-24 04:23 am UTC (link)
A wise person once said some thing like a simple plan in 15 minutes that works now is better then a complex one six weeks later that works perfectly.

Band aids are better then nothing until better hits (y).


Also, I believe most applications just use pthread_mutex_*. That's why we didn't see this with innodb. It doesn't make extensive use of rwlocks.

I see in the manual pages that the pthread_mutex and friends are marked POSIX.1 while pthread_rwlock_* is marked as SUSv2 in their standards compliance notes, that might play some part in people deciding which to use I guess but the history involved kind of predates me :\

(Reply to this)(Parent)


(Anonymous)
2008-03-26 02:28 pm UTC (link)
Hi Jeff!
Do you know if InnoDB have the same "problem"?

Thank you!

(Reply to this)(Thread)


[info]jeffr_tech
2008-03-27 07:36 am UTC (link)
We seem to scale as well as anyone with innodb. It uses a different style of locking and buffering which both contribute to the problem with myisam.

(Reply to this)(Parent)


[info]pashustik
2008-04-30 06:49 pm UTC (link)
Any chance to see bugfix in RELENG_7_0 ?

(Reply to this)


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