Why did Meteor v0.4.x (MongoDB?) use to take up ~3GiB of disk space for a very simple app?
meteor, mongodb
Solution
This is fixed on the development branch of meteor and will be in the next release.
https://github.com/meteor/meteor/commit/6042b91a9ca75fc47b2477e613da093f1c9b943e
It seems mongo defaults to using huge files and has to be told not to. Understandable for the normal use case of mongo, I guess. By preallocating big files they can improve performance in some cases.
Problem
UPDATE: this was fixed after Meteor v0.4 (2012). For historical purposes: I'm testing Meteor on a micro EC2 Ubuntu 11.10 instance (8GiB) and upon installing it and logging in I ran the `df` command to see how much memory had been consumed by core files (about 10%): ``` Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 8256952 782068 7055456 10% / udev 295276 4 295272 1% /dev tmpfs 121248 148 121100 1% /run none 5120 0 5120 0% /run/lock none 303112 0 303112 0% /run/shm ``` Upon installing NodeJS & NPM I again ran `df` to determine how much more room had been consumed and it didn't look like much (an additional 2%): ``` Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 8256952 919444 6918080 12% / udev 295276 4 295272 1% /dev tmpfs 121248 148 121100 1% /run none 5120 0 5120 0% /run/lock none 303112 0 303112 0% /run/shm ``` I then went about installing MongoDB, and as expected, this took quite a lot more memory (59% of disk space in use): ``` Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 8256952 4585884 3251640 59% / udev 295276 4 295272 1% /dev tmpfs 121248 148 121100 1% /run none 5120 0 5120 0% /run/lock none 303112 0 303112 0% /run/shm ``` However, upon installing Meteor, `curl install.meteor.com | /bin/sh` creating the sample myapp from their site `meteor create myapp` and running myapp `cd myapp` & `meteor` I successfully saw the app in the browser displaying "Hello World" (etc), on the terminal side I saw this: ``` [[[[[ ~/myapp ]]]]] Initializing mongo database... this may take a moment. Running on: http://localhost:3000/ ^C ``` Upon closing the server I checked `df` one last time and was surprised to see a disk full!? ``` Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 8256952 7778748 58776 100% / udev 295276 4 295272 1% /dev tmpfs 121248 148 121100 1% /run none 5120 0 5120 0% /run/lock none 303112 0 303112 0% /run/shm ``` My question is: why did Meteor (MongoDB?) take up ~3GiB disk space for a very simple app? Is there a way of reducing this consumption of disk space? Thanks!