DocumentDB memory usage

0

Hi, Memory usage on DocumentDB is getting lower slowly but surely. What may be causing such behavior?

When should we increase the instance type? According to docs the rule of thumb is to increase the memory amount once we hit less than 1/3 of total memory, but the reason for the increase is what we are more interested in.

demandé il y a un an1183 vues
3 réponses
0

There can be several reasons for the memory usage on DocumentDB to be getting lower slowly but surely:

Database activity: If there is less activity on the database, such as fewer reads and writes, then there will be less memory usage.

Automatic indexing: DocumentDB automatically indexes all data in a collection, so if the data set is small, the memory usage will be lower.

Data retention policies: If there are data retention policies in place, such as automatic deletion of old data, then the amount of data stored in the database will decrease, resulting in lower memory usage.

Cache eviction: DocumentDB uses a Least Recently Used (LRU) cache eviction policy, which evicts the least recently used items from cache when it reaches its limit. If the database is not being used actively, the cache will evict items and the memory usage will decrease.

As for the question of when to increase the instance type, the rule of thumb is to increase the memory amount once we hit less than 1/3 of total memory, but the reason for the increase is more important, you should consider the following:

If the workload is increasing and the database is not able to handle the increased load, then the instance type should be increased to handle the additional load.

If you are seeing frequent throttling errors, it is likely that the current instance type does not have enough resources to handle the workload, and you should consider increasing the instance type.

If you are seeing high CPU usage, it may be a good idea to increase the instance type to handle the increased workload.

If you are seeing high memory usage, it may be a good idea to increase the instance type to handle the increased workload.

It is important to monitor your database's performance and usage to determine when it is necessary to increase the instance type.

profile picture
répondu il y a un an
0

Hi, Thank you for your answer @jayamaheizenberg. Can you please provide info on what specifically may cause increasing memory usage in DocumentDB?

répondu il y a un an
0

Hello. Which metric are you referring to, is it FreeableMemory? There's good insight and recommendations in the documentation which says that when this metric goes below 10% of total instance memory, then scale up the instance. To gather more information you could enable Performance Insights (this is done at instance level). Try correlating the free memory drop with the other metrics, increase in database connections, opcounters (inserts, updates, query, getmore), CPU usage which means the workload has increased. In PI you can check the top queries utilising the most resources that can lead to identifying the root cause.

AWS
Mihai A
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions