These are questions I did not find in the FAQ


(Michel Conrado (Support Engineer)) #1

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


(Michel Conrado (Support Engineer)) #2

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.


(Peter Stace) #3

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?


(Michel Conrado (Support Engineer)) #4

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”.


(Peter Stace) #5

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.


(Michel Conrado (Support Engineer)) #6

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.


(Peter Stace) #7

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.


(system) #8

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