My C++ application uses libsybdb.so sybase shared library to connect to Sybase database. I am running this in Solaris 10 Sparc OS. i.e My application uses the API's provided by the library libsybdb.so to perform actions (specifically bulk copy) in sybase database. The C++ Application parses a input file and copies the parsed data into the database using bulkcopy(to do this the API is provided by libsybdb.so).
Usually the bulkcopying takes places within minutes, But Sometimes it takes a 1 hr to complete. I took a pstack of the application when it is slow. It is given below.
fd4ce294 pollsys (ffbcfbd8, 1, ffbcfb28, 0)
fd464b2c poll (ffbcfbd8, 1, 3e8, 10624c00, 0, 0) + 7c fe699ce8 sybnet__complete_io (2d8c84, 3e8, 0, fffffffd, 0, 2d8c20) + 2a0 fe66bafc read_buffer (2d6d60, ffbcfca4, ffffd8f1, 0, fffffff6, fe7454c0) + 36c fe669ec8 recvfill (2d6d60, ffbcfd04, 0, 0, 2d6850, 2d6d60) + 40 fe669e64 recvserver (2d6d60, 2d6d68, 1, 1, 0, 1) + 70 fe65a384 dbdoneinproc (2d6d60, 0, 0, 0, 1, 1) + 44 fe66447c dbsqlok (2d6d60, 2d54, f91cc, 0, 2d6d8c, 0) + 394 <<application code functions>>
Pstack was taken in a regular interval of 1 minutes when the issue was occurring. and the stack was the same.
All the methods shown (like dbsqlok, sybnet__complete_io) belong to libsybdb.so except for poll and pollsys (which are system calls), They are triggering the execution of pollsys which is called thousands of times, which is making it slow. Though the call to pollsys is eventually resolved and there is no data loss i.e the loading is successfull. I would like to know why it is slow, why pollsys is getting called many time ??? Also when the bulk copy is working fine then the call ti pollsys is minimum i.e about 300 calls.
Thanks in advance.
The question has been closed for the following reason "Question is off-topic or not relevant" by Mark Culp 15 Mar '13, 17:26
Unless you are connecting to a SQL Anywhere (as opposed to ASE) database, you are likely in the wrong place. Have a look at http://www.sybase.com/detail_list?id=11507 to find a more suitable forum.
If you are using SQL Anywhere, please provide more details as to the version and how you are connecting.
answered 31 May '12, 17:05