MySQL Forums
Forum List  »  Connector/C (libmysql)

mysqlclient cpu lockup unnecessary?
Posted by: Jesse
Date: May 08, 2005 10:49PM

I wrote a test application to confirm my suspiscions about the mysqlclient locking up unnecessarrially.
All the test application does is create many threads and each thread runs off one of 10 different sql queries, during a 100ms "peak" period, and then does nothing for a 2000ms period, and keeps doing that until I break the program.
The odd behavior that I see is that occasionally the CPU use for the test application jumps from around 1% up to 99.9%, while the general CPU use indicator for idle CPU time hangs around its usual 97%. I know this sounds like a contradiction, but it is actually hapenning and I have a screen shot to prove it, and I can replicate this issue.
What I suspect is happening is that the 99.9% cpu use is where multiple threads are concurrently calling either "poll" or "select" as these functions are known to produce this type of behavior under these conditions.

Is there a way to configure the mysqlclient such that it will not use select, and instead use a non-blocking polling mechanism or a blocking read type mechanism?

The described scenario is two Linux Red Hat 9.0 servers, one is sql client, and the other is sql server, connected by 100mbps network, sql server is version 4.0.17-log and sql client version is 4.0.24

Options: ReplyQuote

Written By
mysqlclient cpu lockup unnecessary?
May 08, 2005 10:49PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.