Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all articles
Browse latest Browse all 1560

NDBD Uses More Memory than Expected (2 replies)

$
0
0
Hello,
:)
I am putting together another cluster, but I am having some issues.

Here is my setup:

2 x Debian 6 Linux 2.6.32-5-amd64, 1 GB of RAM each.

Each of them run:
1 x NDB MGMD
1 x NDBD
1 x MySQLD

/etc/hosts:
10.0.0.3  Server1
10.0.1.5  Server1_2

10.0.0.4  Server2
10.0.1.6  Server2_2

/etc/config.ini:
[ndb_mgmd default]
datadir=/var/local/mysql/data

[ndb_mgmd]
hostname=Server1_2
NodeId=1

[ndb_mgmd]
hostname=Server2_2
NodeId=4

[ndbd default]
NoOfReplicas=2
DataDir=/var/local/mysql/data
#LockPagesInMainMemory=1
#DataMemory=256M
#IndexMemory=128M
#StringMemory=100
#StringMemory=50

#DataMemory=16M
#IndexMemory=8M
#StringMemory=10


# ODirect=1
#MaxNoOfConcurrentOperations=4294967039
#MaxNoOfConcurrentTransactions=4294967039

#MaxNoOfConcurrentOperations=1024
#MaxNoOfConcurrentTransactions=1024

#MaxNoOfLocalScans=16
# MaxNoOfTables=256
# MaxNoOfOrderedIndexes=64

# SchedulerSpinTimer=400
# SchedulerExecutionTimer=100
# RealTimeScheduler=1

#CompressLCP=1
#CompressBackup=1

[ndbd]
#hostname=Server1
hostname=Server1_2
NodeId=2

[ndbd]
#hostname=Server2
hostname=Server2_2
NodeId=5

[mysqld]
hostname=Server1_2
NodeId=3

[mysqld]
hostname=Server2_2
NodeId=6/

/etc/my.cnf:
[mysqld]
ndb-nodeid=<ID>
log-bin=<hotname>-bin
ndbcluster
datadir=/var/local/mysql/data
basedir=/usr/local/mysql
socket=/var/run/mysqld/mysqld.sock
pid-file=/var/run/mysqld/mysqld.pid
port=3306
server-id=<ID>
#log-bin
federated
user=root
default-storage-engine=ndbcluster
#ndb-use-exact-count=0
#ndb-index-stat-enable=0
#ndb-force-send=1
#engine-condition-pushdown=1
#ndb-connect-string=<hostname>

#[mysql-cluster]
#ndb-connect-string=<hostname>

First, when starting up the NDBD's, each uses 340-400 MB of RAM, which is 80% - ~98% of the RAM (500 MB - 700 MB used when idle), and the swap usage increases dramatically from 0 - ~512 MB. *

I was able to start them only once previously.

* If I leave the defaults for most of the parameters, or if I specify less DataMemory and less IndexMemory than the dafault, the NDBD does not pass startphase 0, but stalls there indefinitely, without any error.

* If I specify more DataMemory, and more IndexMemory tham the default, the NDBD stops at startphase 0 and gives the error "Node X: Forced node shutdown completed. Occured during startphase 0. Initiated by signal 11." and a few times "by signal 9" after a short while.

I use the following commands to start the processes on each OS:
ndb_mgmd -f /etc/config.ini --configdir=/etc --initial
ndbd --initial OR "ndbd --initial --nostart" and ndb_mgm -e "<ID> start"

I configured another cluster some time ago, but I don't think the NDBD was using much more memory than specified in the configuration.

Secondly, I have another side question:

Each machine has 2 NICs, each on a different network.
eth0: 10.0.1.0
eth1: 10.0.0.0

When I initially tried starting up the NDBD's they gave the error that the NDBD was connecting from the wrong host, 10.0.1.6 instead of 10.0.0.4; I forgot the exact error message. This is why I worked around it by specifying another host name, and using that. "ndb_mgm -e show" displays either one IP though: sometimes one IP and sometimes the other.

So, how can I specify which network/NIC/IP the cluster should use? I tried specifying "ndb-connect-string" in my.cnf, but that did not help.

Thank you for your time!

Viewing all articles
Browse latest Browse all 1560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>