[unixODBC-support] Performance unixodbc myodbc v/s mysql native

Aditya Bhasin aditya.bhasin at openwave.com
Fri Mar 18 18:32:13 GMT 2005


I have been trying  to get some comparison going between using unixodbc and
myodbc driver v/s using mysql native API.

 

Nick was kind enough to help me a bit on this.

 

I am currently seeing a 10 to 12 fold difference in txn per sec 

 

In all these scenarios - using 50 threads - 1000 queries per thead - in
total 50000 queries (50% insert, 50% deletes)

 

Using mysql native API's -

 

59 maglinux14.openwave.com:/users/aditya/mysql/play2 > \time -p ./q 1000 4
files loaded Fri Mar 18 07:53:33 2005: program started. 

Fri Mar 18 07:53:33 2005: All connections opened.

Fri Mar 18 07:54:13 2005: program ended. 

real 40.15

user 1.42

sys 0.74

 

Txn Per Sec = 50,000 / 40.15 = 1245 tps

 

 

Using unixODBC api with mysql driver -

 

132 maglinux14.openwave.com:/users/aditya/mysql/play5 > \time -p ./q 1000 4
files loaded Fri Mar 18 07:54:24 2005: program started. 

Fri Mar 18 07:54:25 2005: All connections opened.

Fri Mar 18 08:03:51 2005: program ended. 

real 467.66

user 4.91

sys 2.74

 

Txn Per Sec = 50,000 /467 = 107 tps.

 

 

Nick suggested adding the param Threading=0 to my odbcinit.ini

 

The problem is that when I add odbcinit.ini under /usr/local/etc 

I get the following problem -

Error : [unixODBC][MySQL][ODBC 3.51 Driver]Can't connect to local MySQL
server through socket '/var/lib/mysql/mysql.sock' (2) cannot open db
connection in thread: 3076481616

 

Any ideas what could be causing this?

 

 

So here is my config -

--== odbc.ini ==--

[myodbc]

Driver       = /usr/local/lib/libmyodbc3_r.so

Description  = MyODBC 3.51 Driver DSN

SERVER       = maglinux11.openwave.com 

PORT         = 3306 

USER         = pres 

Password     = pres

Database     = presence

OPTION       = 

SOCKET       =

Trace        = Yes

TraceFile    = /tmp/sql.log

--== odbcinst.ini ==--

[mysql]

Driver          = /usr/local/lib/libmyodbc3_r.so

Threading       = 0

 

 

Thanks,

 

aditya

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20050318/c9e4082e/attachment.html>


More information about the unixODBC-support mailing list