APE
APE

Reputation: 1170

How much disk space for MongoDB

I am about to setup MongoDB on AWS EC2 (Amazon Linux HVM 64bits) and implement RAID 10.

I am expecting a couple of millions of records for a system of videos on demand.

I could not find any good advice on how much disk space I should use for that instance.

The dilemma is that I can't spend too much on EBS volume right now, but if I have to add a new bigger volume in less than a year and turn the db off to move the data to that new volume, that is a problem.

For the initial stage, I was thinking 16Gb (available after RAID 10 implementation) on a t2.medium, with plan of upgrading to m4.medium and adding replica sets later. Any thoughts on this?

Upvotes: 2

Views: 3886

Answers (1)

Matt Houser
Matt Houser

Reputation: 36073

The math is pretty simple:

Space required = bytes per record x number of records

If you have an average of 145 bytes per record with an expectation of 5 million records, you can work with 1 GB of storage.

EBS storage is pretty cheap. 1 GB of SSD is $0.10 per month in us-east-1. You could allocate 5 GB for only $0.50 per month.

Also, RAID 10 is RAID 0 and RAID 1 combined. Read over this SO question regarding RAID 0 and RAID 1 configurations with EBS.

https://serverfault.com/questions/253908/is-raid-1-overkill-on-amazon-ebs-drives-in-terms-of-reliability

Upvotes: 3

Related Questions