[unixODBC-support] Contention problem

Nick Gorham nick at lurcher.org
Fri Apr 7 15:31:56 BST 2017


On 07/04/17 15:19, Reza Taheri wrote:
>
> I am running into an ODBC performance problem that looks like mutex 
> contention and getting serialized behind some resource. We are 
> experienced performance engineers, but not very experienced with odbc, 
> which we have been using for a few years during the development of 
> this TPC benchmark.
>
> We use unixODBC-2.3.4, built with: ./configure --prefix=/usr 
> --sysconfdir=/etc --enable-threads=yes --enable-drivers=yes 
> --enable-driver-conf=yes
>
> Myconfig files have:
>
> [root at w1-tpcv-vm-49 ~]# cat /etc/odbcinst.ini
>
> # Example driver definitions
>
> # Driver from the postgresql-odbc package
>
> # Setup from the unixODBC package
>
> [PostgreSQL]
>
> Description = ODBC for PostgreSQL
>
> Driver = /usr/lib/psqlodbcw.so
>
> Setup = /usr/lib/libodbcpsqlS.so
>
> Driver64 = /usr/pgsql-9.3/lib/psqlodbcw.so
>
> Setup64 = /usr/lib64/libodbcpsqlS.so
>
> FileUsage = 1
>
> Threading = 0
>
> [root at w1-tpcv-vm-49 ~]# cat /etc/odbc.ini
>
> [PSQL2]
>
> Description = PostgreSQL
>
> Driver = PostgreSQL
>
> Database = tpcv
>
> ServerName = w1-tpcv-vm-50
>
> UserName = tpcv
>
> Password = tpcv
>
> Port = 5432
>

Probably worth asking the folk who wrote that driver. Are the threads 
sharing a connection handle? if they are I would expect that the socket 
that points to would be a limiting factor and expect it to all become 
serialised behind that.

If you have a single connection and lots of statements, you could make 
the handle validation quicker by configuring with --enable-fastvalidate

1.95%  libodbc.so.2.0.0                 [.] __validate_stmt

-- 
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20170407/4001dbec/attachment.html>


More information about the unixODBC-support mailing list