Hi!

I have a few questions/observations about the caching model.  Any help
clarifying these issues would be greatly appreciated. (I'm working on a
Windows Server class OS).
 

1) Setting the SQLITE_CONFIG_PAGECACHE keyword within sqlite3_config()
seems to define a single cache for the instance of the database.
However, from what I've observed/read, each connection to the database
has its own cache (Unless the shared cache mode is enabled).  So how
does the single buffer defined by SQLITE_CONFIG_PAGECACHE relate to the
cache for each connection instance?

2) I had stupidly defined the SQLITE_DEFAULT_PAGE_SIZE to be 4096, and
the SQLITE_DEFAULT_CACHE_SIZE to 200,000 within a program that has 15+
database connections.  When I started hammering my program, I saw the
memory shoot up to well over 1.5GB and continue climbing.  I came to
realize that each connection had a maximum cache size of 750MB which
combined would easily exceed the 2GB program limit.  What's interesting
is that after I let the app sit with no work for about an hour and then
executed a single write and commit, the app size shrunk by about 1GB
which implies the cache was cleaned out.  Does anybody have details on
when and how the cache is flushed?


Thanks,
Mike Borland

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to