Re: [sqlite] Smallest reasonable cache size

2017-02-19 Thread Kim Gräsman
On Fri, Feb 17, 2017 at 8:37 PM, Richard Hipp wrote: > On 2/17/17, Kim Gräsman wrote: >> >> Thanks, shrink_memory could come in handy. But this is not the problem >> we're trying to solve -- rather we want to claim as much memory as possible >> up-front to make mem usage deterministic and make it

Re: [sqlite] Smallest reasonable cache size

2017-02-17 Thread Richard Hipp
On 2/17/17, Kim Gräsman wrote: > > Thanks, shrink_memory could come in handy. But this is not the problem > we're trying to solve -- rather we want to claim as much memory as possible > up-front to make mem usage deterministic and make it easier to diagnose > other subsystems with run-away memory

Re: [sqlite] Smallest reasonable cache size

2017-02-17 Thread Kim Gräsman
Den 17 feb. 2017 5:33 em skrev "Richard Hipp" : On 2/17/17, Kim Gräsman wrote: > > If we let it use malloc directly and control it > with the soft heap limit, we'll have a steadily rising memory curve > until all caches are fully loaded (could take weeks.) > Caches get flushed from time to time,

Re: [sqlite] Smallest reasonable cache size

2017-02-17 Thread Richard Hipp
On 2/17/17, Kim Gräsman wrote: > > If we let it use malloc directly and control it > with the soft heap limit, we'll have a steadily rising memory curve > until all caches are fully loaded (could take weeks.) > Caches get flushed from time to time, for example when another process writes to the d

Re: [sqlite] Smallest reasonable cache size

2017-02-17 Thread Kim Gräsman
Thanks for your responses! On Thu, Feb 16, 2017 at 8:56 PM, Dominique Pellé wrote: > > I think it's probably best to give a large cache_size to > each connection, and limit the total amount of memory > used by SQLite with sqlite3_soft_heap_limit64(). > This will effectively limit the global amoun

Re: [sqlite] Smallest reasonable cache size

2017-02-16 Thread Dominique Pellé
Kim Gräsman wrote: > Hi all, > > In my battles with lots of connections competing over precious cache > memory, I've considered giving some non-critical connections zero > cache using `PRAGMA cache_size=0`. > > Is this a reasonable thing to do? If zero is too extreme, what might a > more moderate

Re: [sqlite] Smallest reasonable cache size

2017-02-16 Thread Richard Hipp
On 2/16/17, Kim Gräsman wrote: > I've considered giving some non-critical connections zero > cache using `PRAGMA cache_size=0`. > > Is this a reasonable thing to do? Yes. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mai

[sqlite] Smallest reasonable cache size

2017-02-16 Thread Kim Gräsman
Hi all, In my battles with lots of connections competing over precious cache memory, I've considered giving some non-critical connections zero cache using `PRAGMA cache_size=0`. Is this a reasonable thing to do? If zero is too extreme, what might a more moderate small cache size be? 32? 64? 100?