These are questions I did not find in the FAQ

Is there a minimum memory limit? (Docker - for example)
Are there any minor memory recommendations?
Are there crucial situations that need more memory than the default?

Cheers

PS. My question is related to my needs. I’ll have more than one microservices.
If I have 2GB of memory for each service it gets bad. Let’s say I have 15 microservices using Dgraph. Then are more than 30GB of memory. I realy need to split into microservices, but I can not spend much at the beginning with Cloud computing.

2 Likes

In most setups, there is a single dgraph instance per host. We recommend to set --memory_mb to half of the available memory on that machine. So for a machine with 4GB of memory, you should set -memory_mb=2048. The more memory you give dgraph, the better performance it will have on large datasets.

For your 15 microservices, are you using 1 dgraph instance per micro service?

I’m using rancher/server for orchestration. Initially I plan to do few services for my Beta tests. But I foresee that I will need to abstract more services.

I use Redis for a queue service. I’m changing my overall logic template to Dgraph - I was using a mix of RedisGraph with MongoDB. And I also have an accounting service I did with Mysql that I also want to change to Dgraph.

My API is in GraphQL to use with two types of Apollo Client. I integrate others third-party services into this same API. And I use JWT to control writing in each distributed service and auth.

I really just needed to know the least of the minimums to set up my environments.

For your 15 microservices, are you using 1 dgraph instance per micro service?
Yes, for now two and creating relationships through IDs

An instance I am using to maintain all social network logic. Where there is an option to follow, (I have queued in Redis to control who accepts to be friend), user data (much information of the user) and the other instance will be a series of products that also have relations between products and “owners”.

At a minimum, you need 2GB of memory per dgraph instance that you run (use the --memory_mb=1024, as we recommend to set this to half the memory available).

It sounds like you only need one dgraph instance? So that’s 2GB memory total you would need for dgraph.

For now it’s Two. I updated a little what I wrote above.

1GB is not recommended for small services? which do not require much of the instance.

If the amount of data you have is small, you don’t do much indexing, and there aren’t many queries, you would probably be okay with only 1GB.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.