NDB Cluster DataNode Consuming much RAM - mysql

I have set up NBC Cluster at my Office. There are two physical Machines with 128G/each. The database size is around 2G. We are an ISP and we have kept the RADIUS database in the cluster.
The thing that is worrying me at the moment is, in both the Systems, the process is consuming 122G each out of 128 and I think its shocking.
I am quite new to database so I am having trouble debugging the issue.

The memory used by NDB data nodes is defined by your cluster
configuration. So even if the database is only 2GB in size, if you
have configured to run with up to 64 GByte of memory, this memory
is preallocated to ensure that it is there when it is needed.
So look into your config.ini file to see how you configured the
NDB data nodes.

Related

Majority of Database Connections going to one Aurora DB

I have an AWS Mysql Aurora DB setup to autoscale when it reaches a certain CPU threshold, that said, looking at usage a majority of DB connections are only going to a single DB. Aurora is meant to load balance this, but is there anything additional I can do to ensure a more even distribution of DB connections? I'm having some latency issues with my website, and I think they could be originating from here as all other metrics are normal.

Reduce memory consumption of mariadb 15.1.41 for micro instance

Running mariadb in micro instance with 600MB memory, and its a very low usage instance and for testing purpose.
Is there a way to reduce the memory consumption for this test database instance?
Tried turning off performance schema and other options available in this link, but still, the memory consumption is about 600 MB.
Reducing memory consumption of mysql on ubuntu#aws micro instance

Do I need separate servers for Mysql Dev and Live databases in order to optimize memory usage?

My question is about mysql databases on same hardware / mysql instance and how it affects memory usage: INNODB_BUFFER_POOL more specific.
Today, we have all our DBs: Dev, BackUp and Live; residing on same rack/mysql server instance.
Would it be useful to build new server? Like Separate hardware and mysql instance to allocate better memory for each needs (DEV,BackUp,Live)? Is there a way to allocate memory for each DB individually if they reside on same hardware / mysql instance?
Ex: DB1 can use max 64GB RAM, DB2 only max 16GB
I was thinking about building a standard server, for backup and Development, Testing. For the Live(production) server leave a better build ( memory, hardware) and leave it as dedicated as possible with only DB and tables needed.
Here some article I was reading as reference regarding what Im trying to explain.
https://haydenjames.io/mysql-performance-drop-unused-databases/
Thanks

Compute Engine Instance

I have created a Google Compute Engine instance with CentOS and added some stuff there, such as Apache, Webmin, ActiveCollab, Gitolite etc.. etc.
The problem is that the VM is always running out of memory because the RAM is too low.
How do I change the assigned RAM in Google Compute Engine?
Should I have to copy the VM to another with bigger RAM? If so will it copy all the contents from my CentOS installation?
Can anyone give me some advises on how to get more RAM without having to reinstall everything.
Thanks
The recommended approach for manually managed instances is to boot from a Persistent root Disk. When your instance has been booted from Persistent Disk, you can delete the instance and immediately create a new instance from the same disk with a larger machine type. This is similar to shutting down a physical machine, installing faster processors and more RAM, and starting it back up again. This doesn't work with scratch disks because they come and go with the instance.
Using Persistent Disks also enables snapshots, which allow you to take a point-in-time snapshot of the exact state of the disk and create new disks from it. You can use them as backups. Snapshots are also global resources, so you can use them to create Persistent Disks in any zone. This makes it easy to migrate your instance between zones (to prepare for a maintenance window in your current zone, for example).
Never store state on scratch disks. If the instance stops for any reason, you've lost that data. For manually configured instances, boot them from a Persistent Disk. For application data, store it on Persistent Disk, or consider using a managed service for state, like Google Cloud SQL or Google Cloud Datastore.

Tomcat and MySql on VPS

I am doing some experimentation with VPS before moving my application from private Tomcat hosting to cloud. It is a read intensive app built on Struts 2 + Spring + Hibernate + MySql. Its a moderately popular app in India with 1500 visitors and 10,000 pageviews per day. I have some basic questions about choosing a server configuration.
1) Would it be enough to have 256M RAM for running both Tomcat and Mysql. I wont be running anything else other than SSH. No apache, FTP etc. My current heap size is 190M. can i still set the heap size as 190M with 256M RAM? What are the pros and cons?
2) Is it better to have 2 256M servers one with Tomcat and one with Mysql? or 1 server with 512M running both MySql and Tomcat?
I am open to any suggestions. Thanks!
1)
I think it could be done.. I've seen a similarly sized app running on 256MB Linux VPS.
However, you're leaving very little memory for MySQL, which will cause it to have to go to disk often. It could be quite slow.
2)
One server is better than two. You have less to configure and you don't pay for the OS + virtual machine container overhead twice. Also, your app server and your database may not use equal memory, so being on separate machine could be an inefficient use of memory.
I don't believe a 256MB VPS can effectively run a Java WebApp. You need at least a 512MB VPS. I wouldn't consider splitting until you go past a 1GB container. When you split, you have the overhead of the OS running 2x. One of the advantages of splitting though, is you may have more burst-able capacity. If the two VPS are on separate hardware and you get a rush of traffic, you may be able to use more CPU cycles than a single container on a single host. This depends on the load of the other containers of course, and your VPS provider's policy on bursting.