MySQL Forums
Forum List  »  Performance

Yet another RAM question
Posted by: Nuno Donato
Date: May 16, 2020 06:18AM

Hi folks

I'm finishing up an app for a client which will soon go to the production server. The server runs an older app, which is very very slow. Some demanding queries take up to 8minutes to return a result (I had to change the timeout settings in order to get them)

But my question pertains to RAM. We are pondering spinning up a fresh server to start things from a better place and "how much ram" is a question that keeps popping up.

The current server has 24Gb of Ram, the DB can easily reach 100Gb this year (most of it in just one table which holds the data and is responsible for the slow queries of the old app).

My app has pretty good queries (I believe) and I can get the data in less then a second (new DB with good indexes). HOWEVER, I still would like to keep a good amount of RAM thinking of future growth.

So I analyzed the current server while doing one of these slow queries, and 'top' revealed that mysqld was using only 1.4% of memory! I always thought that RAM was very much used when mysql had to keep rows in memory during queries. Seems I was wrong. Interestingly, the cpu usage went up to around 30%.

So now I'm a bit confused because I always thought ram was first, storage second and cpu last. 1.4% of 24Gb is only 400mb of ram.. which sounds odd for a long query in a big table.

Am I missing something here?

(btw, InnoDB is the engine, if it matters)

thanks!

Options: ReplyQuote


Subject
Views
Written By
Posted
Yet another RAM question
683
May 16, 2020 06:18AM
380
May 16, 2020 08:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.