Frequently Asked Questions
Beta (current state 2016/09):
alpha
is the volume name, and Alpha/
the mounting point:
% metafs alpha Alpha/
% cd Alpha/
% metabusy backup
% cd ..
% metafs -u alpha
at this point you either turn off the old MongoDB and start the new MongoDB, or connect the volume with the new MongoDB running at an alternative port (e.g. 27024):
% metafs alpha Alpha/
or
% metafs --mongo.port=27024 alpha Alpha/
as next make sure the new mongorestore
will be used by metabusy
, then:
% cd Alpha/
% metabusy restore
Once you tested that the restore worked as expected, you may
% metabusy purgebackup
marc
and format the volume, unmount, remount and restore from the .marc
archive, which will trigger update
event on all items and re-extract metadata, depending on amount of items can be time consuming:
% marc cvz ~/alpha-backup.marc .
% metabusy format
% cd ..
% metafs -u alpha
at this point you switch MongoDB, or run on a new port, then
% metafs alpha Alpha/
% cd Alpha
% marc xv ~/alpha-backup.marc
Please read the following answers carefully, as it's a bit tricky to get an overview what the different limits are.
MMAPv1 and WiredTiger stand for storage engines of MongoDB, and MetaFS::IndexDB is in development aimed to lift the limits of the other backends (not yet released, expect coming with 0.6.x):
MongoDB 2.4/2.6/3.0 (MMAPv1): Maximum of size of all metadata of all items of a volume cannot exceed the virtual memory of the machine.
MongoDB 3.0 (WiredTiger): (unknown)
TokuMX 2.0: (unknown)
MetaFS::IndexDB: Maximum size of a single index (of a key) cannot exceed 256TiB.
The maximum size of content per items depends on the underlying filesystem:
Ext4: 16TiB
XFS: 8,000TiB (8EiB)
ZFS: 16,000TiB (16EiB)
Btrfs: 16,000TiB (16EiB)
uid
, apprx. 64 bytes per key results in 242 entries or 4,398,046,511,104 or 4 * 1012 items
Following metadata limits apply, depending on the backend database in use:
MongoDB 3.0 (WiredTiger): (unknown)
TokuMX 2.0: Maximum of size of the metadata of a single item or file is 16MiB.
MetaFS::IndexDB: unlimited, although the metadata of a single item has to fit into the physical memory, so a fraction (e.g. 1/10) of the physical RAM might be a good max size so
itself doesn't use that many resources, e.g. 16GiB RAM -> 1GiB max metadata which is a lot; with 500MB/s SSD it takes ~2 secs to load, so be aware of overly large metadata of a single item.
MongoDB 3.0 (WiredTiger): (unknown)
TokuMX 2.0: The maximum filename length is 16MiB minus the other metadata of the item / file.
MetaFS::IndexDB: unlimited (see also "Metadata total size" above)
Needless to say, insanely long filenames (>10,000 characters) don't make sense, as the filename is mainly an identifier used for humans to memorize, conceptually uid
and globally unique.
a.b.c....z.a0.b0.c0...
of 100 levels or 99 dots, and 123 characters at max.
MongoDB 3.0 (WiredTiger): (unknown)
TokuMX 2.0: Maximum of depth of metadata key is 100, e.g. a.b.c....z.a0.b0.c0...
of 100 levels or 99 dots, and 123 characters at max.
MetaFS::IndexDB: unlimited levels (see also "Metadata total size" above), yet the underlying filesystem might pose limits[1] to the total length of the key:
All metadata is searchable, regardless about its possible indexed state:
Sinceaims to index all metadata, but there is a maximum of only 64 metadata keys being indexed as only 64 indexes per collection are supported in MongoDB. The system metadata keys areuid
,name
,parent
,type
,ctime
,mtime
,atime
,utime
,otime
,mime
,size
,hash
,tags
,title
,author
this means 15 are already used, 49 other keys are available. Images haveimage.*
, audio itemsaudio.*
, textual content hastext.
, etc; about 35 custom keys are free to use. This is a severe limitation currently and is about to be addressed (patching MongoDB or switching to another NoSQL database). See also MongoDB.org: MongoDB Limits and Limits of MongoDB.
MetaFS::IndexDB: unlimited (see also "Metadata total size" above); by default all key's values are indexed.
MongoDB 2.4/2.6/3.0 (MMAPv1/WiredTiger): uses up (all) available memory in order to do fast lookup in memory, virtual as well resident memory uses grows and cannot be limited, leaves control up to the operating system to allow other programs to use (virtual/resident) memory. For example:
MongoDB 2.6.1: 12 * 106 (12 mio) Wikipedia .txt files: virtual: 65GB, resident: 5.2GB, shared: 5.1GB
TokuMX 2.0: unknown
MetaFS::IndexDB: 15-30MB at normal operation, all data resides on disk (indexes and metadata preferably on SSD, the data itself can reside on slower HDD).
Qemu-KVM | works |
VirtualBox | works |
AWS EC2 | works |
DigitalOcean VPS | works |
Commercial VPS | doesn't work[1] |
LXC | doesn't work[2] |
Docker | works[3] |