Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow read of blob and high memory usage [JDBC497] #535

Closed
firebird-automations opened this issue Jun 1, 2017 · 10 comments
Closed

Slow read of blob and high memory usage [JDBC497] #535

firebird-automations opened this issue Jun 1, 2017 · 10 comments

Comments

@firebird-automations
Copy link

Submitted by: A Drouard (adrouard)

Attachments:
TestReadBlob.java

I recently upgraded from Jaybird 2.2.9 to Jaybird 3.0.0.
My application is reading a lot of BLOB, and since the upgrade, I noticed a degradation of performance and memory usage.
The problem is particulary visible when reading 2 BLOB columns.

-----------------------------------
Reading 1 blob column :
Jaybird 2.2.9 : 300 000 rows fetched in 45 564 ms, connection closed in 0 ms, heap memory usage : 20 MB
Jaybird 3.0.0 : 300 000 rows fetched in 77 130 ms, connection closed in 28 000 ms, heap memory usage : 687 MB
-----------------------------------
Reading 2 blob columns :
Jaybird 2.2.9 : 300 000 rows fetched in 102 960 ms, connection closed in 1 ms, heap memory usage : 25 MB
Jaybird 3.0.0 : 300 000 rows fetched in 325 930 ms, connection closed in 16 3967 ms, heap memory usage : 653 MB

Commits: 5463983 8a38eb9 5cb3b74 24cf380

@firebird-automations
Copy link
Author

Modified by: A Drouard (adrouard)

Attachment: TestReadBlob.java [ 13130 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

What is the size of the blobs on average?

@firebird-automations
Copy link
Author

Commented by: A Drouard (adrouard)

The size of the blobs on average is 200 bytes.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

It looks like Jaybird is not removing the blob handles from databaseListenerDispatcher after blob close.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

The problem was indeed a leak of blob handles.

Snapshot with fix on Maven Sonatype snapshot repository as 3.0.1-SNAPSHOT

Download:
Java 7: https://www.dropbox.com/s/2ff6xe88ybyyzwh/Jaybird-3.0.1-SNAPSHOT-JDK_1.7.zip?dl=0
Java 8: https://www.dropbox.com/s/m7dk3cf4t0lpwvd/Jaybird-3.0.1-SNAPSHOT-JDK_1.8.zip?dl=0

I'm considering to release 3.0.1 soon.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.1 [ 10831 ]

Fix Version: Jaybird 3.1 [ 10441 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Clarification: "Soon" means somewhere next week (probably Monday)

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Released with Jaybird 3.0.1 : https://github.com/FirebirdSQL/jaybird/releases/tag/v3.0.1

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment