GB wrote:
> So where have you got this wisdom from? It's just plain Bullshit!
>
> Just as most cache managers do, Windows cache manager uses some sort of LRU
> caching scheme. So all data once read from file is kept in memory until either
> some memory pressure occurs or it is simply pushed out by newer data.

No. Windows will toss clean pages out even in the total absence of memory 
pressure. It is moronic, but true. You can repeat the steps I outlined for 
yourself and see.

https://groups.google.com/d/msg/comp.os.ms-windows.nt.misc/449tdNYPoX0/it4cx8Gvv2AJ

> Actually, from what I've experienced, I'd recommend to size sqlite's memory to
> fit for your largest transactions and leave most of the caching to the OS.
>
> And yes, unlike in many *NIX implementations, Windows' FlushFileBuffers() call
> DOES issue according write commands to the hardware, so setting PRAGMA
> synchronous ON/OFF makes a big difference in write performance on Windows
> systems.
>
> Howard Chu schrieb am 30.01.2016 um 23:23:
>> dpb wrote:
>>> Dear Community,
>>>
>>> Assuming that SQLite would arrange the database table contents on page
>>> boundary and
>>>
>>> 1)  if db is small let us say maximum 5MB,
>>>
>>> 2  further if such a db is part of windows service / application running
>>> continuously then may be pages will remain in the memory under normal
>>> conditions.
>>>
>>> Q1) Operating System like Windows would cache the series of pages, is this
>>> behavior not almost same as that of Cache?
>> The Windows cache manager is quite aggressive at evicting cached pages from
>> RAM. It used to be tunable back in Win2000, but none of those tuning knobs
>> survived past WinXP. Generally, if you access some data, leave it for more
>> than 5-10 seconds, don't expect to be able to reference it again without
>> incurring a hard page fault.
>>
>> Note that the cache eviction runs quite frequently - once every 5 seconds or
>> so, and evicts pages regardless of whether there's any memory pressure in the
>> system. It's quite possibly the stupidest cache manager ever written.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Reply via email to