Maximum number of cards with graphics in Mnemosyne?

66 views
Skip to first unread message

Nick Cross

unread,
Aug 21, 2014, 11:59:46 AM8/21/14
to mnemosyne-...@googlegroups.com
I searched the postings using a few key words, but I could not find anything discussing the maximum size of a Mnemosyne database.
 
I have been using Mnemosyne for about five years and I now have close to 7000 cards.  When I finish this project, I will have about 10,000 cards.
 
To date, I have always used text in my question-and-answer cards.  I have recently started experimenting and adding images to those cards where I have had more challenges with retention.  In some cases, I now have up to four pictures for a card.  I checked and the total size of the graphics that I inserted on one card reached 250kb.  By contrast, the MS-Word file containing lots of sentences and text for 20 new words was only 12kb.
 
My computer has 6GB of RAM of which 5.87GB are usable.  What would the ceiling be for the number of cards if all of my cards had graphics?
 
Thanks in advance!
 

Gwern Branwen

unread,
Aug 21, 2014, 12:30:36 PM8/21/14
to Mnemosyne mailing list
On Thu, Aug 21, 2014 at 11:59 AM, Nick Cross <dns....@gmail.com> wrote:
> To date, I have always used text in my question-and-answer cards. I have
> recently started experimenting and adding images to those cards where I have
> had more challenges with retention. In some cases, I now have up to four
> pictures for a card. I checked and the total size of the graphics that I
> inserted on one card reached 250kb. By contrast, the MS-Word file
> containing lots of sentences and text for 20 new words was only 12kb.
>
> My computer has 6GB of RAM of which 5.87GB are usable. What would the
> ceiling be for the number of cards if all of my cards had graphics?

I don't understand why you would think there would be a limit.

An image in a flashcard is just a crossreference/URI like '<img
src="images/bulgogi_1.jpg"/>', where the actual image is stored
on-disk at a filepath like
/home/gwern/doc/mnemosyne/default.db_media/images/bulgogi_1.jpg . So
the limit on actual images is however many images you can fit on your
hard drive. I have 1115 images with a total size of 17868kb, so the
average is 16.03kb. My partitioned disk has 917G or 917000000kb
available for use, so I could fit a maximum of <57.2 million images
(917000000 / (17868 / 1115) ~> 57,222,688.6).

The database itself is implemented using sqlite3, with an upper limit
of ~140TB (https://www.sqlite.org/limits.html). My personal database
has 19293 cards (over ~4 years of usage) and a size of 29584kb
suggesting each card uses up >1.54kb in the long-run. So Mnemosyne
would be limited to <91.3 billion flashcards by sqlite3's limitations
(140000000000 / (29584 / 19293) ~> 91,300,027,042). But it'd probably
run into some limits in Python or the libraries before then.

--
gwern
http://www.gwern.net

Nick Cross

unread,
Aug 21, 2014, 12:46:41 PM8/21/14
to mnemosyne-...@googlegroups.com, gw...@gwern.net
Thanks.  This is very reassuring.  I will happily add images to my cards.
 
I am very much an end user with no knowledge of the architecture, but I am now curious...
 
Where would the limit be?  Would it be the amount of RAM available to handle scheduled cards or is it the size of the hard-drive?
 
Thanks

Oisín

unread,
Aug 21, 2014, 1:12:22 PM8/21/14
to mnemosyne-...@googlegroups.com
I don't think the entire deck is loaded into RAM at once, and certainly images are not; rather, they're loaded on demand (i.e. as the card is being displayed) and can be removed automatically from memory afterwards thanks to the magic of garbage collection.
The size of the "cards" themselves is very small and is unlikely to ever present an issue. The only thing that might be of note is having lots of very large image, video or audio files.


--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/7cab9ff6-5a06-40cd-bb84-b13e162d9c8d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages