[sqlite-dev] Consumming memory with SQLITE

3 views
Skip to first unread message

51966

unread,
Sep 8, 2019, 5:43:37 AM9/8/19
to sqlit...@mailinglists.sqlite.org
Hello,
I have an application composed of 256 databases. Each database occupied 42Mb for more than 950 000 records into.
These 42Mb are measured after a Vacuum.
When I lauched my application it only opens the databases (all) and the memory is filled by 57mb just for SQLITE !
When I launch a treatment to generate random passwords the memory is filled at 87% (>2Gb).
I would like to reduce this used memory but I don't know how.

I have the following pragmas :

main.page_size=65536
wal_autocheckpoint=0
encoding "UTF_8"
temp_store=FILE
case_sensitive_like=TRUE
foreign_keys=OFF
legacy_file_format=OFF
cache_size=-200
main.cache_size=-200
main.auto_vacuum=NONE
main.journal_mode=OFF
main.secure_delete=OFF
main.synchronous=OFF
main.locking_mode=EXCLUSIVE
main.user_version=230714the data
main.application_id=241259
shrink_memory

Some pragmas have a sense when creating the database and the other when creating the tables.

I have recompiled SQLITE with the following options :

SQLITE_ENABLE_COLUMN_METADATA = 1
SQLITE_THREAD_SAFE = 2
SQLITE_DEFAULT_MEMSTATUS = 0
SQLITE_DEFAULT_FILE_FORMAT = 4
SQLITE_DEFAULT_PCACHE_INITSZ = 0
SQLITE_WIN32_MALLOC = 1
SQLITE_TEMP_STORE = 0
SQLITE_CASE_SENSITIVE_LIKE = 1
SQLITE_ENABLE_API_ARMOR 1
SQLLITE_ENABLE_FTS3 = 1
SQLLITE_ENABLE_FTS3_PARENTHESIS = 1
SQLLITE_ENABLE_FTS3_TOKENIZER = 1
SQLLITE_ENABLE_FTS4 = 1
SQLLITE_ENABLE_FTS5 = 1
SQLLITE_ENABLE_GEOPOLY = 1
SQLLITE_ENABLE_DESERIALIZE = 1
SQLLITE_ENABLE_JSON1 = 1
SQLLITE_ENABLE_MEMORY_MANAGEMENT = 1
SQLLITE_ENABLE_RTREE = 1
SQLLITE_ENABLE_ENABLE_SESSION = 1
SQLLITE_ENABLE_SOUNDEX = 1

The software is running under W7 Pro
I have no problem with it, I find it very fast.
But this memory used/consummed is really a problem.
I have a small machine with only 3Gb of RAM and only one program needs 87% !
How to reduce that.
 
I would appreciate some help.
Thank You

Philippe RIO
Lankou / Grincheux


Sent with ProtonMail Secure Email.

Reply all
Reply to author
Forward
0 new messages