0

I have a MYSQL database hosted on RDS with 16GB RAM. I'm using an r4.large with 20GB General purpose SSD storage. We are using a microservice architecture and has 6 backend containers. So the request will hit the RDS from that 6 backend servers.

The operation on our application has more read and write operations. We are trying a load test of our application and using 10 to 20 users for the load test. But while testing and when we reached nearly 20 users for load test, we noted that the response time is really high. While checking on RDS metrics, we figured out that the freeable memory came down from 15GB to nearly 1GB and not coming up also.

The main issue we faced was when we again test the load using 10 users, the response time taken was really high. It was not comparable with the initial test results of 10 users.

I'm not sure it is the freeable memory causing the issue, or else any other factor. How can I figure out the issue and resolve it? Any help would be appreciated.

3
  • Sounds like your database is just using a lot of RAM. If 10 - 20 users is overloading your database I think you need a DBA to help you optimise the database and queries.
    – Tim
    Commented Apr 3, 2019 at 8:22
  • In my case, while I continuously test with 10 concurrent uses with a loop count of 10, the freeable memory keeps on decreasing. I afraid if I keep on testing this, this freeable memory reaches to 0. Commented Apr 3, 2019 at 9:36
  • 3
    Freeable memory on an r4.large with default configuration should never be expected to be above approximately 3 GB except when you first start up the instance, or in cases where you have very little data stored. Most of the instance's memory is expected to be in use (not freeable) all the time, by the InnoDB buffer pool, which is -- in simplified terms -- a cache that allows disk reads to be avoided for better performance. Low freeable memory is probably not related to the performance issue. Commented Apr 3, 2019 at 16:53

1 Answer 1

0

How much data in your database? If it is several GB, then it is being loaded into RAM; the loading will not go beyond innodb_buffer_pool_size, which is probably set to something below 16G.

What is in your "load test"? Is it the same queries you will have in production? Or is it something just for the test. I ask because benchmarking often causes its own problems.

High response time -- Either the queries are missing indexes (etc), or the benchmark is designed to stress test. The latter often sacrifices response time in a misguided attempt to see how many users can be handled. A bad response time will drive away users, thereby invalidating the "it can handle up to N users" result of the load test.

Please provide some clues of what type of application, what the queries look like, what the schema looks like, what queries are "slow", etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .