You are here:  » Memory allocation


Memory allocation

Submitted by IG on Mon, 2015-04-13 08:21 in

Hi David

My new sever has 64 GB RAM and I was wondering how to best allocate them. Please also let me know (if possible) where I need to make these changes.

For you information, my database has over 500K products from approx. 50 merchants. The number of categories is small (for now), but there are hundreds of brands.

It seems my old server with 2GB RAM handled the above data almost as good as the new one, so there most definitely be room for improvement.

Kind regards,
Ivo

Submitted by support on Mon, 2015-04-13 08:28

Hello Ivo,

I normally suggest around 1/4 available server memory shared equally between key_buffer_size and sort_buffer_size but of course there becomes a point of diminishing returns - if sufficient RAM is available (even at 2GB) to avoid swapping, additional RAM isn't likely to have a significant impact however there is obviously scope to increase the buffers significantly in this case with 64GB physical available. Have a go with 1GB buffers each, e.g.

sort_buffer_size=1GB
key_buffer_size=1GB

The settings go in /etc/my.cnf, if not already present, the should be under the [mysqld] section, if exists. Always make a backup before editing system files - and don't forget to restart MySQL server for the changes to take effect...

Cheers,
David.
--
PriceTapestry.com

Submitted by IG on Mon, 2015-04-13 09:55

Hi David

Thanks a lot for your help.

This is new territory form me. I have managed to access my.cnf on my server and will post the content at the end of this email.

I have a few questions:
- How do I make a backup of my.cnf?
- Where exactly should I add the code you mention above?
- How do I make these changes? Do I need a program/tool to do all this?

As always, I hope you can point me in the right direction.

Kind regards,
Ivo

{code saved}

Submitted by support on Mon, 2015-04-13 10:19

Hello Ivo,

I'll follow up by email to take you through it step-by-step...

Cheers,
David.
--
PriceTapestry.com