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.

asked 31 May '12, 02:19

aejaz's gravatar image

aejaz
0111
accept rate: 0%

closed 15 Mar '13, 17:26

Mark%20Culp's gravatar image

Mark Culp
23.0k9130270

@Mark: I'm glad you don't replace the "sybase" with a "sap" tag:)

(15 Mar '13, 17:41) Volker Barth
Replies hidden

I'm just doing a bit of cleanup of the tags. E.g. 'sybase' and 'sqlanywhere' are useless tags because they don't add any value ... since this forum is all about "SAP Sybase SQL Anywhere".

(15 Mar '13, 19:08) Mark Culp

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.

permanent link

answered 31 May '12, 17:05

Phil%20Mitchell's gravatar image

Phil Mitchell
1.9k1831
accept rate: 27%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×50
×2

question asked: 31 May '12, 02:19

question was seen: 1,472 times

last updated: 15 Mar '13, 19:08