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

Enabling SQLITE_CONFIG_MEMSTATUS is oveloading sqlite #955

Closed
mhanna opened this issue Aug 28, 2023 · 3 comments
Closed

Enabling SQLITE_CONFIG_MEMSTATUS is oveloading sqlite #955

mhanna opened this issue Aug 28, 2023 · 3 comments
Labels

Comments

@mhanna
Copy link

mhanna commented Aug 28, 2023

Describe the bug
When enabling the parameter SQLITE_CONFIG_MEMSTATUS at compile time, the performance (read/write) is more than 2x slower

To Reproduce
compile with -DSQLITE_CONFIG_MEMSTATUS=1

Expected behavior
A seamless way of using the sqlite memory status without hitting the performance at least 2x times.

Logs
If applicable, provide logs.

Environment (please complete the following information):
OS: centos
CPU architecture: x86_64
sqlite-jdbc version 3.42

Additional context
A reply from the sqlite support:

Is your app calling sqlite3_soft_heap_limit64(), sqlite3_hard_heap_limit64(), or sqlite3_soft_heap_limit? Or is it compiled with the SQLITE_MAX_MEMORY option set to some value?

These interfaces are used to specify a global limit to the amount of memory used by the library, but they only work if memstats are enabled. If one of these limits was enabled by SQLITE_DEFAULT_MEMSTATUS=1 it might slow the application down to the extent you're seeing.

@mhanna mhanna added the triage label Aug 28, 2023
@gotson
Copy link
Collaborator

gotson commented Aug 29, 2023

I don't quite understand what you expect from this ticket tbh.

Is your app calling sqlite3_soft_heap_limit64(), sqlite3_hard_heap_limit64(), or sqlite3_soft_heap_limit? Or is it compiled with the SQLITE_MAX_MEMORY option set to some value?

We don't use any of this.

@mhanna
Copy link
Author

mhanna commented Aug 29, 2023

I expect to have the ability to get memory statistice from sqlite without more than 2x reduction in performance.
So i don't know where the issue is, sqlite or the jdbc, i will try to involve sqlite developers into this.

@gotson
Copy link
Collaborator

gotson commented Aug 29, 2023

I will close this, there's nothing pointing to any fault of the driver itself.

@gotson gotson closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants