# Constrained RAM in an application development environment

**URL:** <https://forums.foundationdb.org/t/constrained-ram-in-an-application-development-environment/347>\
**Category:** Using FoundationDB\
**Created:** [May 4, 2018, 7:00pm UTC](https://forums.foundationdb.org/t/constrained-ram-in-an-application-development-environment/347 "2018-05-04T19:00:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jweir](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/jweir/32/196_2.png) [@jweir](https://forums.foundationdb.org/u/jweir)\
**Post date:** [May 4, 2018, 7:00pm UTC](https://forums.foundationdb.org/t/constrained-ram-in-an-application-development-environment/347/1 "2018-05-04T19:00:59Z")

</div>

Will FoundationDB run with less than 4 GB of ram? Not in production, but in development of our application.

Our developers have a single VM running the entire stack, on machines (MacBooks) with 16 GB of RAM(max). I’m probably not going to be able allocate another 4GB of RAM on these machines.

Lets say we evaluate FoundationDB and find it will be an amazing addition to our stack. But we can only allocate another 2 GB.

Can a FoundationDB server operate with that little memory,? Our development environments are not very intense, so performance is not much of an issue.

Thanks!

---

<div class="post-metadata">

**Author:** ![dave](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/dave/32/89_2.png) [@dave](https://forums.foundationdb.org/u/dave)\
**Post date:** [May 5, 2018, 12:24am UTC](https://forums.foundationdb.org/t/constrained-ram-in-an-application-development-environment/347/2 "2018-05-05T00:24:20Z")

</div>

If you put hardly any data in it, it probably won’t use a ton of memory. Otherwise you will probably run out as it allocates memory for page caching, MVCC, etc - it doesn’t adapt to the actual amount of RAM available.

I think you could configure fdbserver via knobs to run reliably in ~2GB of RAM, obviously with somewhat reduced performance. Something like

knob\_page\_cache\_4k=300e6  
knob\_target\_bytes\_per\_storage\_server=300e6

might be a good start. (Obligatory warning: changing knobs in production systems is dangerous! This advice is for development use only.)

---

<div class="post-metadata">

**Author:** ![abdullin](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/abdullin/32/83_2.png) [@abdullin](https://forums.foundationdb.org/u/abdullin)\
**Post date:** [May 5, 2018, 6:45am UTC](https://forums.foundationdb.org/t/constrained-ram-in-an-application-development-environment/347/3 "2018-05-05T06:45:53Z")

</div>

I’ve seen FoundationDB survive quite well on a QA server which was overpopulated with running instances and continuously running out of free RAM.

---

<div class="post-metadata">

**Author:** ![KrzysFR](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/krzysfr/32/43_2.png) [@KrzysFR](https://forums.foundationdb.org/u/KrzysFR)\
**Post date:** [December 28, 2018, 4:56pm UTC](https://forums.foundationdb.org/t/constrained-ram-in-an-application-development-environment/347/4 "2018-12-28T16:56:52Z")

</div>

Maybe this can be useful to someone.

Here is the actual memory consumption of each process running on a test cluster running 5 process per host (16 GB RAM, ubuntu linux, ssd engine), and _without any changes to the settings or knobs!_ The data are comming straight out of the `status json` metrics.

The statistics are right after big import job, and after the cluster has settled down to idle, so all the storage nodes have had the opportunity to fill their cache with hot data.

**You mileage may vary, values could be different under a different workload, don’t sue me!**

_Processes grouped by roles:_

 ![image](https://global.discourse-cdn.com/foundationdb/original/1X/8feda03a8bf7525375564b62e84237bf98ba6f86.png)

Storage processes tend to average 3.7 - 4.0 GB, Log processes are around 1 GB, Resolver is ~0.7 GB and the other stateless processes (master, proxy, controller) use 200 - 300 MB RAM

Here is another view, showing the usage per host: looks like only 11.5 - 12 GB of RAM are enough to fit 1 log + 3 storage + 1 stateless.

 ![image](https://global.discourse-cdn.com/foundationdb/original/1X/e6e0c6f160902894b39932337279a64f066009f5.png)
