sybase-ase15

Sybase 12.5 vs 15.0 client connect libraries: 10x slower insert using 15.0 when inserting into 15.7 ASE


I maintain some legacy code that runs on RH Linux that sends inserts over the network to a client's Sybase. We were using Sybase 12.5 libraries and have just migrated to use Sybase 15.0 client libraries.

My application logs the time at which it sends the insert over the network and also the time it get the acknowledgment back from the target Sybase. When using 12.5 libraries the time was ~5 ms, now with the 15.5 libraries it's roughly 50 ms.

The only change I've made on the application side is to specify the location of the interfaces file on the command line. Previously the file was located in the default location - the location of the Sybase installation. Now it's located where the application is deployed, hence the need to specify the location explicitly.

Would anyone have any idea what is causing the dramatic change in speed, or have hints on where I could look or ideas on how to trace the root cause?

Please forgive the lack of technical details. I'm not a DB admin but a developer using a compiled library to connect to Sybase and don't have access to the nitty-gritty internals. That being said, I'm using the same internal library in both cases, it's only the Sybase librairies that are different.

My Sybase 12.5 and 15 installations look like this:

$ ls -l /opt/sybase/
total 48
-rw-r--r--  1 root root  555 Jul  2  2019 ASE150.csh
-rw-r--r--  1 root root  259 Jul  2  2019 ASE150.env
-rw-r--r--  1 root root  388 Jul  2  2019 ASE150.sh
drwxr-xr-x 10 root root 4096 Feb  2  2017 OCS-15_0
-rw-r--r--  1 root root  555 Jul  2  2019 SYBASE.csh
-rw-r--r--  1 root root  259 Jul  2  2019 SYBASE.env
-rw-r--r--  1 root root  388 Jul  2  2019 SYBASE.sh
drwxr-xr-x 58 root root 4096 Jul  2  2019 charsets
drwxr-xr-x  3 root root 4096 Jul  2  2019 collate
drwxr-xr-x  2 root root 4096 Nov 23 20:55 config
-rw-r--r--  1 root root 1239 Jul  2  2019 interfaces
drwxr-xr-x  5 root root 4096 Nov 23 20:55 locales
$ ls -l ~/12_5/sybase/
total 28
drwxrwxr-x  4 oadc oadc 4096 Nov 29  2017 OCS-12_5
drwxrwxr-x 58 oadc oadc 4096 Nov 29  2017 charsets
drwxrwxr-x  2 oadc oadc 4096 Mar 16 09:45 config
drwxrwxr-x  2 oadc oadc 4096 Mar 16 09:45 include
-r-xr-xr-x  1 oadc oadc 1184 Mar 16 09:45 interfaces
drwxrwxr-x  2 oadc oadc 4096 Mar 16 09:45 lib
drwxrwxr-x  5 oadc oadc 4096 Mar 16 09:45 locales

EDIT

After some more digging it looks like the libraries under OCS-12-5 are not actually for 12_5 but for 15_5!

$ strings sybase/OCS-12_5lib/libsybct*.a | grep "Sybase Client-Library" Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64/BUILD1550-003/64bit/OPT/Mon Oct 5 23:16:48 2009 Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64 Native Threads/BUILD1550-003/64bit/OPT/Tue Oct 6 00:06:57 2009

Which means that my assumption that 12.5 was faster than 15.0 is wrong. What is actually happening is that 15.5 is faster than 15.0. Which makes more sense.

I'm not going to go hunt down the idiot that submitted these files into a directory labelled OCS-12-5 ...


Solution

  • After some more digging it looks like the libraries under OCS-12-5 are not actually for 12_5 but for 15_5!

    $ strings sybase/OCS-12_5lib/libsybct*.a | grep "Sybase Client-Library" Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64/BUILD1550-003/64bit/OPT/Mon Oct 5 23:16:48 2009 Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64 Native Threads/BUILD1550-003/64bit/OPT/Tue Oct 6 00:06:57 2009

    Which means that my assumption that 12.5 was faster than 15.0 is wrong. What is actually happening is that 15.5 is faster than 15.0. Which makes more sense.

    I've updated the question with this new information.