On Fri, 13 Jul 2018, Martin Vystrčil wrote:

Hello everyone,

I have a problem using sqlite in one of my project. When I create instance
of sqlite (sqlite_open) from main thread, memory consumption is in normal
(a few megabytes). But when I start sqlite from another thread, immediately
around 70 - 80 MB of memory is allocated.

Here is the smallest example, which can reproduce this problem. Link to
pastebin where source code is: https://pastebin.com/BkU3uMCb.

I can not be bothered to visit such a site.

What is the size of the sqlite database file? Is memory-mapping enabled on the file? Is WAL-mode enabled?

There is also some more info about memory usage.

The growth seems to be almost entirely virtual memory, which could be due to the size of the database file and the options used (e.g. mmap of the file leads to more virtual memory used). The VmRSS value (in conjunction with VmSwap=0) is more interesting since it indicates how much memory is actually being used.

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to