Blog Content

  • MongoDB 에서 SSD DISK 사용 시 주의사항

    Category NOSQL on 2019. 8. 12. 14:55

    확인버전 : - MongoDB 3.4.2 (journal enable, chainingAllowed:1, protocolVersion:1 ) - MongoDB 3.4.10 (journal enable, chainingAllowed:1, protocolVersion:1 ) - configString: "cache_size=64GB,config_base=true,eviction_dirty_target=20,eviction_dirty_trigger=40,eviction_target=70,eviction_trigger=95,eviction=(threads_min=2,threads_max=4),checkpoint_sync=true” 문제사항 : Primary, Secondary 장비의 (SSD) disk util..

    Read more
  • AWS 인스턴스에 대한 스냅샷 백업 스크립트

    Category AWS on 2017. 9. 7. 07:51

    AWS 인스턴스에 대한 스냅샷 백업이 필요할 때 사용하는 스크립트 입니다. 기본적으로 스냅샷생성 및 오래된 스냅샷 삭제처리 기능이 있습니다. 참고로 메모리 내용까지는 스냅샷 백업이 되지 않기 때문에 DBMS 인스턴스에 사용하게 될 경우 check point 주기에 따라 일부 데이터 손실이 발생 할 수도 있습니다. NOSQL 의 MongoDB 에서는 저널설정을 on 한 경우에만 사용하시는게 좋습니다. (단 저널파일과 데이터 파일에 대한 EBS 볼륨이 나눠진 경우는 fsynclock 설정 후 스냅 샷 백업을 진행해야만 백업 정합성을 보장 합니다.) 스크립트를 이용하기 위한 사전 작업으로는 스냅샷 백업을 위한 VOLUMES_LIST 항목을 아래와 같이 등록하여야 합니다. 참고URL : https://n2ws...

    Read more
  • GrayLog 설치하기

    Category OpenSource on 2017. 5. 24. 13:20

    AWS 환경에서 설치하기 때문에 외부, 내부 IP 설정이 필요 합니다. [설치파일목록] elasticsearch-2.4.4.tar.gz graylog-2.2-repository_latest.deb jdk-8u121-linux-x64.tar.gz mongodb-linux-x86_64-ubuntu1404-3.4.4.gz ############################### java 설정 ########################################################## mkdir /usr/java cd /usr/java tar xvzf jdk-8u121-linux-x64.tar.gz ln -s jdk1.8.0_121/ default ############################..

    Read more
  • [ArangoDB] Replication Overview (비동기 복제)

    Category NOSQL on 2017. 3. 3. 18:50

    참고: 내용의 end-point 는 노출을 방지하기 위해 변경처리 하였습니다. ■ ArangoDB Replication Overview ▶ OverviewArangoDB에서 복제의 주요 목적은 특정 데이터베이스의 읽기 확장 성 및 "핫 백업"을 제공하는 것입니다.복제설정은 슬레이브 데이터베이스에서 replication applier 를 활성화 해야 합니다.복제는 동기, 비동기 방식을 모두 지원 합니다.복제는 데이터베이스 단위로 발생 합니다.복제는 컬렉션 단위로 설정 가능 합니다. (syncCollection)복제시 ChunkSize 를 조정하여 동기화 강약을 조정할 수 있습니다. (사이즈가 적으면 Master 연결 요청 수가 증가)복제 중지 후 자동 재시작 설정이 가능 합니다. ■ ArangoDB Asy..

    Read more
  • [ArangoDB] Basic Guide Overview

    Category NOSQL on 2017. 3. 2. 12:38

    ■ ArangoDB Overview ▶ Architecture https://docs.arangodb.com/3.1/Manual/Architecture/ AppendOnly / MVCC 모든 수정, 삭제 작업은 새로운 Document 를 생성함으로 객체가 보존되고 쓰기 읽기 트랜잭션이 분리 됩니다. Mostly Memory/Durability 데이터베이스 문서는 메모리 맵 파일에 저장되며 스토리지에 즉시 동기화 되지 않습니다. Write-ahead log (미리쓰기 로그파일) - 서버 크래시 후 데이터 복구를 실행하는 데 사용되며 복제 설정에서도 사용할 수 있습니다. - 기본적으로 각 미리 쓰기 로그 파일의 크기는 32MB입니다. (--wal.logfile-size) - write-ahead log 파일..

    Read more
  • [Linux] Performance Tools : full version draft

    Category 운영체제 on 2017. 2. 20. 10:34

    * dstat (리소스 체크) # dstat -c --top-cpu -d --top-bio --top-latency * iostat (리소스 체크) # iostat -dx 1 * numactl (numa 사용여부) # apt-get install numactl # numactl --hardware available: 1 nodes (0) node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 node 0 size: 64392 MB node 0 free: 389 MB node distances: node 0 0: 10 * dmesg (H/W 상태체크) # dmesg ...

    Read more
  • [Python] Redis INFO 정보 출력하기

    Category SOURCE on 2017. 2. 18. 16:04

    https://pypi.python.org/pypi/redis #!/usr/bin/env python import redis import json import time r_total_net_output_bytes =0 r_total_net_input_bytes =0 r_keyspace_hits =0 r_keyspace_misses =0 r_used_cpu_sys =0 r_used_cpu_user =0 r_used_cpu_sys_children =0 r_used_cpu_user_children =0 FLAG=0 print ("%-20s %-7s %-10s %-5s %-5s %-6s %-10s %-10s %-12s %-12s %-12s %-8s %-13s %-9s %-11s %-7s %-12s %-12s %..

    Read more
  • [MySQL] Bug 72804 Workaround: “BINLOG statement can no longer be used to apply query events”

    Category MYSQL on 2017. 2. 18. 15:42

    Percona Blog 에 올라온 알려진 버그 72804 정보 공유 드립니다. 버그 내용에 대해 쉽게 설명하자면 PITR (point-in-time recovery) 작업 시 특정 또는 원하는 라인부터 복원 하고자 할 때 아래 메시지와 같이 BINLOG statement 정보가 없어 복원 오류가 발생한다는 내용 입니다. “The BINLOG statement of type Table_map was not preceded by a format description BINLOG statement.” 그렇다면 해결 방법은? 복원하고자 하는 9021 line 부터 마지막 까지 script 를 생성한 후 아래처럼 1~11 line 까지 BINLOG statement 정보를 추출하여 합쳐서 실행해 주면 됩니다. (..

    Read more
  • [Python] MySQL CRUD 샘플 스크립트

    Category SOURCE on 2017. 2. 18. 15:06

    https://dev.mysql.com/doc/connector-python/en/ 아주 간단한 MySQL 연동 샘플 입니다. mysql.connector 사용하며 데이터베이스는 mysql online 에서 제공하는 employee 데이터베이스를 이용 하였습니다. #!/usr/bin/python #!-*- coding: utf-8 -*- import os import sys import time import logging import datetime import mysql.connector import logging.handlers from mysql.connector import errorcode from argparse import ArgumentParser from argparse import Ra..

    Read more
  • [Python] MongoDB 컬렉션 사이즈 확인

    Category SOURCE on 2017. 2. 9. 14:41

    소스 저장후 python test.py 실행하면 admin, local, config 를 제외한 모든 데이터베이스에 대한 컬력션 용량 정보가 출력 됩니다. #!/usr/bin/python #!-*- coding: utf-8 -*- import time import pymongo from pymongo import MongoClient USER='아이디' PASS='패스워드' client = MongoClient("mongodb://192.168.0.1",30011) db = client['admin'] db.authenticate(USER,PASS, mechanism='SCRAM-SHA-1') lotime = time.strftime('%Y/%m/%d %H:%M:%S',time.localtime(time..

    Read more