• MySQL매뉴얼
    • MySQL 5.6 매뉴얼
    • MySQL 5.1 매뉴얼
    • MySQL 5.0 매뉴얼
    • MySQL HA 매뉴얼
  • 기술문서
    • Xtrabackup 구성
    • 메모리 사용량 모니터링
  • 라이선스
  • 온라인문의
  • 회사소개
  • → 목 록 (MySQL5.6 한글메뉴얼) [close]
  • 1. MySQL 5.6 새로운 기능
  • 2. MySQL 설치 및 업그레이드
  • 3. MySQL Tutorial
  • 4. MySQL 프로그램
  • 5. MySQL 서버관리
  • 6. 보안
  • 7. 백업 및 복구
  • 8. 최적화
  • 9. Language Structure(언어구조)
  • 10. Character Sets(Globalization)
  • 11. 데이터형(Data Types)
  • 12. 함수와 연산자
  • 13. SQL 문법
  • 14. InnoDB 스토리지 엔진
  • 15. 기타 스토리지 엔진
  • 16. 고가용성 및 확장성
  • 17. 리플리케이션
  • 18. MySQL Cluster
  • 1. MySQL Cluster 개요
    2. MySQL Cluster 설치
    3. MySQL Cluster 설정
    1. MySQL Cluster의 빠른 테스트 설정
    2. MySQL Cluster 구성 매개 변수의 개요
    3. MySQL Cluster 구성 파일
    1. MySQL Cluster 구성의 기본적인 예제
    2. MySQL Cluster의 권장 초기 구성
    3. MySQL Cluster의 연결 문자열
    4. MySQL Cluster의 컴퓨터의 정의
    5. MySQL Cluster 관리 서버의 정의
    6. MySQL Cluster 데이터 노드의 정의
    7. MySQL Cluster의 SQL 노드 및 기타 API 노드의 정의
    8. MySQL 클러스터의 TCP/IP 연결
    9. 직접 연결을 사용하는 MySQL Cluster의 TCP/IP 연결
    10. MySQL Cluster의 공유 메모리 연결
    11. MySQL Cluster에서 SCI 전송 연결
    12. MySQL Cluster의 전송 버퍼 매개 변수 구성
    4. MySQL Cluster용 MySQL Server 옵션 및 변수
    5. MySQL Cluster에서 고속 인터커넥트 사용
    4. MySQL Cluster 프로그램
    5. MySQL Cluster 관리
    6. MySQL Cluster Replication
    7. MySQL Cluster Release Notes
  • 19. 파티셔닝
  • 20. Stored Programs and Views
  • 21. INFORMATION_SCHEMA
  • 22. PERFORMANCE SCHEMA
  • 23. 컨넥터 및 API
  • 24. MySQL 확장
  • 25. MySQL Enterprise Edition
  • 26. MySQL Workbench
  • 27. 제약 및 제한
  • 28. MySQL 5.7 새로운 기능

18.3.3.2 MySQL Cluster의 권장 초기 구성

MySQL Cluster에서 최상의 성능을 제공 할 수 있는지 여부는 다음을 포함한 여러 요인에 따라 달라집니다.

  • MySQL Cluster 소프트웨어 버전

  • 데이터 노드 및 SQL 노드의 수

  • 하드웨어

  • 운영 체제

  • 저장되는 데이터의 양

  • 클러스터 가동시 부하의 크기와 종류

따라서 최적의 구성을 획득하는 과정은 반복적 인 일이 될 가능성이 높고, 그 결과는 개별 MySQL Cluster 구축에 따라 크게 다를 수 있습니다. 클러스터가 동작하는 플랫폼과 MySQL Cluster의 데이터를 사용하는 응용 프로그램이 변경 될 때 구성의 변경이 필요할 수 있습니다. 이러한 이유로 모든 사용 시나리오에 적합한 단일 구성을 제시하는 것은 불가능합니다. 그러나이 섹션에서는 권장되는 초기 구성을 보여줍니다.

초기의 config.ini 파일 MySQL Cluster NDB 7.3 이상을 실행하는 클러스터 구성의 시작점으로 다음 config.ini 파일을 권장합니다.

# TCP PARAMETERS

[tcp default]
SendBufferMemory=2M
ReceiveBufferMemory=2M

# Increasing the sizes of these 2 buffers beyond the default values
# helps prevent bottlenecks due to slow disk I/O.

# MANAGEMENT NODE PARAMETERS

[ndb_mgmd default]
DataDir=path/to/management/server/data/directory

# It is possible to use a different data directory for each management
# server, but for ease of administration it is preferable to be
# consistent.

[ndb_mgmd]
HostName=management-server-A-hostname
# NodeId=management-server-A-nodeid

[ndb_mgmd]
HostName=management-server-B-hostname
# NodeId=management-server-B-nodeid

# Using 2 management servers helps guarantee that there is always an
# arbitrator in the event of network partitioning, and so is
# recommended for high availability. Each management server must be
# identified by a HostName. You may for the sake of convenience specify
# a NodeId for any management server, although one will be allocated
# for it automatically; if you do so, it must be in the range 1-255
# inclusive and must be unique among all IDs specified for cluster
# nodes.

# DATA NODE PARAMETERS

[ndbd default]
NoOfReplicas=2

# Using 2 replicas is recommended to guarantee availability of data; 
# using only 1 replica does not provide any redundancy, which means 
# that the failure of a single data node causes the entire cluster to 
# shut down. We do not recommend using more than 2 replicas, since 2 is 
# sufficient to provide high availability, and we do not currently test 
# with greater values for this parameter.

LockPagesInMainMemory=1

# On Linux and Solaris systems, setting this parameter locks data node
# processes into memory. Doing so prevents them from swapping to disk,
# which can severely degrade cluster performance.

DataMemory=3072M
IndexMemory=384M

# The values provided for DataMemory and IndexMemory assume 4 GB RAM
# per data node. However, for best results, you should first calculate
# the memory that would be used based on the data you actually plan to
# store (you may find the ndb_size.pl utility helpful in estimating
# this), then allow an extra 20% over the calculated values. Naturally,
# you should ensure that each data node host has at least as much
# physical memory as the sum of these two values.

# ODirect=1

# Enabling this parameter causes NDBCLUSTER to try using O_DIRECT
# writes for local checkpoints and redo logs; this can reduce load on
# CPUs. We recommend doing so when using MySQL Cluster on systems running 
# Linux kernel 2.6 or later.

NoOfFragmentLogFiles=300
DataDir=path/to/data/node/data/directory
MaxNoOfConcurrentOperations=100000

SchedulerSpinTimer=400
SchedulerExecutionTimer=100
RealTimeScheduler=1
# Setting these parameters allows you to take advantage of real-time scheduling
# of NDB threads to achieve increased throughput when using ndbd. They 
# are not needed when using ndbmtd; in particular, you should not set 
# RealTimeScheduler for ndbmtd data nodes.

TimeBetweenGlobalCheckpoints=1000
TimeBetweenEpochs=200
DiskCheckpointSpeed=10M
DiskCheckpointSpeedInRestart=100M
RedoBuffer=32M

# CompressedLCP=1
# CompressedBackup=1
# Enabling CompressedLCP and CompressedBackup causes, respectively, local
checkpoint files and backup files to be compressed, which can result in a space
savings of up to 50% over noncompressed LCPs and backups.

# MaxNoOfLocalScans=64
MaxNoOfTables=1024
MaxNoOfOrderedIndexes=256

[ndbd]
HostName=data-node-A-hostname
# NodeId=data-node-A-nodeid

LockExecuteThreadToCPU=1
LockMaintThreadsToCPU=0
# On systems with multiple CPUs, these parameters can be used to lock NDBCLUSTER
# threads to specific CPUs

[ndbd]
HostName=data-node-B-hostname
# NodeId=data-node-B-nodeid

LockExecuteThreadToCPU=1
LockMaintThreadsToCPU=0

# You must have an [ndbd] section for every data node in the cluster;
# each of these sections must include a HostName. Each section may
# optionally include a NodeId for convenience, but in most cases, it is
# sufficient to allow the cluster to allocate node IDs dynamically. If
# you do specify the node ID for a data node, it must be in the range 1
# to 48 inclusive and must be unique among all IDs specified for
# cluster nodes.

# SQL NODE / API NODE PARAMETERS

[mysqld]
# HostName=sql-node-A-hostname
# NodeId=sql-node-A-nodeid

[mysqld]

[mysqld]

# Each API or SQL node that connects to the cluster requires a [mysqld]
# or [api] section of its own. Each such section defines a connection
# “slot”; you should have at least as many of these sections in the
# config.ini file as the total number of API nodes and SQL nodes that
# you wish to have connected to the cluster at any given time. There is
# no performance or other penalty for having extra slots available in
# case you find later that you want or need more API or SQL nodes to
# connect to the cluster at the same time.
# If no HostName is specified for a given [mysqld] or [api] section,
# then any API or SQL node may use that slot to connect to the
# cluster. You may wish to use an explicit HostName for one connection slot
# to guarantee that an API or SQL node from that host can always
# connect to the cluster. If you wish to prevent API or SQL nodes from
# connecting from other than a desired host or hosts, then use a
# HostName for every [mysqld] or [api] section in the config.ini file.
# You can if you wish define a node ID (NodeId parameter) for any API or
# SQL node, but this is not necessary; if you do so, it must be in the
# range 1 to 255 inclusive and must be unique among all IDs specified
# for cluster nodes.

권장되는 SQL 노드의 my.cnf 옵션 MySQL Cluster SQL 노드 역할을하는 MySQL 서버는 항상 명령 행 또는 my.cnf 에 --ndbcluster 및 --ndb-connectstring 옵션을 지정하고 시작해야합니다. 또한 설치에서 다른 옵션을 필요로하는 경우를 제외하고 클러스터의 모든 mysqld 프로세스에 다음 옵션을 설정하십시오.

  • --ndb-use-exact-count=0

  • --ndb-index-stat-enable=0

  • --ndb-force-send=1

  • --engine-condition-pushdown=1


서울시 강남구 영동대로 602 6층  TEL: 02-6061-0006
주식회사 이노클러스터  등록번호 : 727-86-02261
Copyright © innocluster Co. ltd. all rights reserved