Re: ZODB eating CPU but RAM is free

Vlad Oles <[email protected]> Fri, 14 Dec 2018 20:05:25 -0800 (PST)
Newsgroups gmane.comp.web.zope.zodb
Message-ID <[email protected]>
------=_Part_1067_1649472142.1544846725434
Content-Type: multipart/alternative; 
	boundary="----=_Part_1068_1565056867.1544846725434"

------=_Part_1068_1565056867.1544846725434
Content-Type: text/plain; charset="UTF-8"

On Wednesday, July 19, 2017 at 9:54:05 AM UTC-7, Jim Fulton wrote:
>
>
> One thing to understand is that ZODB doesn't limit memory usage.  
> Ghostifies objects to meet memory settings at certain times like 
> transaction boundaries and when asked to explicitly.  So a transaction that 
> loads a lot of objects can grow ram without bound.  This is why 
> applications that load *lots* of objects should explicitly reduce cache 
> size by calling _p_jar.cacheGC() occasionally. 
>

Does it mean that after a database is finalized (no more writing and thus 
transactions), there is no way to bound its RAM cache size other than 
manually resetting cache (via cacheGC() or cacheMinimize()) after every N 
reads?

(I've set a bounty on StackOverfow question about the same, if anybody is 
interested: 
https://stackoverflow.com/questions/53605884/zodb-ignores-target-cached-object-count-and-target-cache-memory-size)

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

------=_Part_1068_1565056867.1544846725434
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, July 19, 2017 at 9:54:05 AM UTC-7, Jim Fulto=
n wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0=
.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><br><=
div><div class=3D"gmail_quote"><div>One thing to understand is that ZODB do=
esn&#39;t limit memory usage.=C2=A0 Ghostifies objects to meet memory setti=
ngs at certain times like transaction boundaries and when asked to explicit=
ly.=C2=A0 So a transaction that loads a lot of objects can grow ram without=
 bound.=C2=A0 This is why applications that load <b>lots</b> of objects sho=
uld explicitly reduce cache size by calling <font face=3D"monospace, monosp=
ace">_p_jar.cacheGC()</font> occasionally. <br></div></div></div></div></bl=
ockquote><div><br></div><div>Does it mean that after a database is finalize=
d (no more writing and thus transactions), there is no way to bound its RAM=
 cache size other than manually resetting cache (via cacheGC() or cacheMini=
mize()) after every N reads?</div><div><br></div><div>(I&#39;ve set a bount=
y on StackOverfow question about the same, if anybody is interested: https:=
//stackoverflow.com/questions/53605884/zodb-ignores-target-cached-object-co=
unt-and-target-cache-memory-size)<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;zodb&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">zodb+unsubscri=
[email protected]</a>.<br />
For more options, visit <a href=3D"https://groups.google.com/d/optout">http=
s://groups.google.com/d/optout</a>.<br />

------=_Part_1068_1565056867.1544846725434--

------=_Part_1067_1649472142.1544846725434--