http://bugs.openzim.org/show_bug.cgi?id=10
Summary: caching on low memory devices Product: openZIM Version: unspecified Platform: PC OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: zimreader AssignedTo: tommi@tntnet.org ReportedBy: mirko@qi-hardware.com CC: dev-l@openzim.org Estimated Hours: 0.0
We have a problem with memory usage on the Ben NanoNote. It comes with 32MB SDRAM. The ZimReader uses more than that. We get an "out of memory" kernel message.
Our guess is, that it is connected to the caching that is being done. It would be great if there was an option to enable a "low memory" version so that the ZimReader runs smoothly on devices such as the Ben.
http://bugs.openzim.org/show_bug.cgi?id=10
Manuel Schneider manuel.schneider@wikimedia.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |P2 CC| |manuel.schneider@wikimedia. | |ch
http://bugs.openzim.org/show_bug.cgi?id=10
--- Comment #1 from Manuel Schneider manuel.schneider@wikimedia.ch 2009-09-25 09:38:47 CET --- Concerning the caches I suggest that the zimreader gets a configure option "--low-memory" which disables pre-fetching and limits the number of cached articles.
http://bugs.openzim.org/show_bug.cgi?id=10
Tommi Mäkitalo tommi@tntnet.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #2 from Tommi Mäkitalo tommi@tntnet.org 2009-11-07 21:25:23 CET --- I added 2 configure options --with-cluster-cache-size=number and --with-dirent-cache-size to tune default cache sizes. Additionally also the environment variables ZIM_CLUSTERCACHE and ZIM_DIRENTCACHE are read, which when set override the cache sizes.
The cluster cache caches uncompressed clusters. By default zimlib caches the last 16 clusters and with the default cluster size of 1MB this means 16MB of memory usage. For small devices the cache size may be reduced.
The dirent cache is by default 512. Dirents are not that big. They take about 30 bytes, so it makes not that much sense to reduce that value.