On 20 February 2014 04:35, Clemens Ladisch <clem...@ladisch.de> wrote: > Woody Wu wrote: >> On 19 February 2014 23:09, Clemens Ladisch <clem...@ladisch.de> wrote: >>> Woody Wu wrote: >>>> sqlite is using mmap to map the database file? >> >> How do I confirm that this is true on Linux platform? > > PRAGMA mmap_size > >>>> If this is the reason, how can I reduce the VSZ used? >>> >>> You could disable mmap. >> >> How do disable it? And what are possible disadvantages if I do it? > > see <http://www.sqlite.org/mmap.html>
Surprised after read the doc. What I used is sqlite 3.7.5, but the doc says that memory-mapped io only started from 3.7.17. I also checked 3.7.5 source code and found it really does not have concept such as "pragma mmap_size", sqlite_config_mmap_size" and so on. So, what are used for the huge VSZ in my sqlite application? Whenn monitor the program, I fund the VSZ of my application can changes from 70M to 200+M. > >>> But why would you want to do this? The size of the virtual address >>> space is 4 GB, so I doubt you are running out of that. >> >> Hum, I understand you are right. But I just wan to ensure ... > > Ensure what? VSZ is just a number. The OS is an embed Linux 3.1.x. I am afraid, when the VSZ of a process goes too large, it could trigger some kind of system bug. By far, I've been always bothered with a sqlite "disk image malformed" issue after my application run a long time. I still have not yet found the root cause of it. So, every suspicious place I want to check. > > > Regards, > Clemens > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer narke public key at http://subkeys.pgp.net:11371 (narkewo...@gmail.com) _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users