'Etc'에 해당되는 글 115건

  1. (BigData) HDInsight Service
  2. spanner 소개
  3. MongoDB MMS 설치
  4. Tempdb Checkpoint 1
  5. 여러개 로그 파일이 좋을까???
  6. Spanner: Google’s Globally-Distributed Database 1
  7. mongodb index tools... 4
  8. 제 2회 mongodb tech semina 참석 후기
  9. MongoDB + Hadoop
  10. sql agent에 할당된 max worker thread 수는 얼마일까?

(BigData) HDInsight Service


 

드뎌 MS에서도 하둡을 연계한 서비스를 개시하였네요. 그 서비스 명칭이 "Microsoft HDInsight Server for Windows" 입니다.

 

• 100% Apache Hadoop compatible Big Data implementation.

• Microsoft support of HDInsight on Windows Server and Windows Azure.

• Simplified deployment and ease of manageability with System Center 2012 or Windows Azure.

• Elegant connectivity to Microsoft Office Excel 2013 and Business Intelligence tools.

 

http://blogs.technet.com/b/dataplatforminsider/archive/2012/10/24/simplifying-big-data-for-the-enterprise.aspx

http://www.microsoft.com/sqlserver/en/us/solutions-technologies/business-intelligence/big-data.aspx

http://www.microsoft.com/en-us/download/details.aspx?id=35397

 

Instructions

Microsoft HDInsight Server Community Technology Preview

• Install the Microsoft Web Platform Installer

• Search for "Hadoop" and follow the installation instructions Windows Azure HDInsight Public Preview

• Visit HadoopOnAzure.com and signup to receive an invitation to the preview.

• Follow installation instructions provided in the invitation to access the Hadoop on Windows Azure public preview

Try out the .NET framework for Hadoop

• Visit HadoopSDK.Codeplex.Com and follow the instructions.

'Etc' 카테고리의 다른 글

mongodb new aggregation  (0) 2012.11.06
MongoDB BSON FORMAT  (0) 2012.10.29
spanner 소개  (0) 2012.10.23
MongoDB MMS 설치  (0) 2012.10.16
Tempdb Checkpoint  (1) 2012.10.10

spanner 소개

'Etc' 카테고리의 다른 글

MongoDB BSON FORMAT  (0) 2012.10.29
(BigData) HDInsight Service  (0) 2012.10.25
MongoDB MMS 설치  (0) 2012.10.16
Tempdb Checkpoint  (1) 2012.10.10
여러개 로그 파일이 좋을까???  (0) 2012.09.25

MongoDB MMS 설치

MongoDB MMS 설치.pdf


Mms는 10gen에서 제공하는 무료 MongoDB 모니터링 툴이다.

   

참고 링크
http://gomi97.tistory.com/645

https://mms.10gen.com/help/install.html#registering-for-mms

   

서버 환경 구성.

CentOS 6.2 64bit

   

MMS 10gen 전용 웹사이트에서 가입

https://mms.10gen.com/user/login

   

MMS 설치 및 실행

   

가. SoftWare 설치

   

  1. 파이썬 설치 툴을 설치 (python2.4+)

    sudo yum install python-setuptools

       

  2. easy_install pymongo

       

    1. mkdir /usr/bin/mms-agent/

      /usr/bin/mms-agent/ 폴더에 압축 해제 후 업로드
       

나. 실행

  1. 실행
    [root@TPSVR01 ~]# cd /usr/bin/mms-agent/

    [root@TPSVR01 mms-agent]# nohup python agent.py > /var/log/mongo_mmm_agent.log 2>&1 &

    [3] 27521

    [2] Exit 2 nohup python agent.py > /var/log/mongo_mmm_agent.log 2>&1

       

  2. 로그 정보 확인

    [root@TPSVR01 mms-agent]# tail -f /var/log/mongo_mmm_agent.log

    nohup: ignoring input

    2012-10-16 10:19:10,174 INFO Starting agent parent process - version: 1.4.6

    2012-10-16 10:19:10,174 INFO Note: If you have hundreds or thousands of databases, disable dbstats on the settings page before running the MMS agent.

    2012-10-16 10:19:10,175 INFO Started agent parent process - version: 1.4.6

    2012-10-16 10:19:15,254 INFO Starting agent process - version 1.4.6

    2012-10-16 10:19:15,257 INFO Started agent process - parent pid: 29394 - version: 1.4.6

       

  3. Mms site에 가서 확인
     

    Agent에 의해서 서버내의 mongodb 성능 정보를 전송합니다.

       

    1. Time zone 변경

      기본 시간이 글로벌 시간이니, Seoul으로 변경하면, 현재 시간으로 확인할 수 있다.

       

       

  4. 확인하기


'Etc' 카테고리의 다른 글

(BigData) HDInsight Service  (0) 2012.10.25
spanner 소개  (0) 2012.10.23
Tempdb Checkpoint  (1) 2012.10.10
여러개 로그 파일이 좋을까???  (0) 2012.09.25
Spanner: Google’s Globally-Distributed Database  (1) 2012.09.17

Tempdb Checkpoint

TempDB를 제외한 모든 DB들의 checkpoint는 주기적으로 진행된다. 여기서 checkpoint란 dirty page에 있는 정보들을 disk에 쓰는 행위를 말한다. 하지만, Tempdb의 경우 log의 70%까지 가득 차여야만 checkpoint를 실행한다.
  

The next most common condition that triggers a checkpoint is when the log becomes 70% full.


When a checkpoint occurs for a database in the SIMPLE recovery model, log clearing (a.k.a. log truncation) occurs. This means that some portions of the transaction log may be able to be marked as reusable if nothing else requires them to be kept around, thus decreasing the amount of space used in the log. (I'm vastly over-simplifying – see my article here for more details.)
 

원본 위치 <http://www.sqlmag.com/blog/sql-server-questions-answered-28/sql-server/when-do-checkpoints-occur-for-tempdb-137143>

   

*. Simple Recovery Type의 경우 Checkpoint는 두 가지 수치에 따라 결정
If the database is using the simple recovery model, an automatic checkpoint is generated whenever the number of log records reaches the lesser of these two values: 

  • The log becomes 70 percent full.
  • The number of log records reaches the number the Database Engine estimates it can process during the time specified in the recovery interval option.

원본 위치 <http://msdn.microsoft.com/en-us/library/ms189573(v=sql.90).aspx>
   

참고 링크
http://www.sqlmag.com/blog/sql-server-questions-answered-28/sql-server/when-do-checkpoints-occur-for-tempdb-137143
http://www.sqlskills.com/BLOGS/PAUL/post/How-do-checkpoints-work.aspx
http://www.sqlskills.com/blogs/paul/post/what-does-checkpoint-do-for-tempdb.aspx

'Etc' 카테고리의 다른 글

spanner 소개  (0) 2012.10.23
MongoDB MMS 설치  (0) 2012.10.16
여러개 로그 파일이 좋을까???  (0) 2012.09.25
Spanner: Google’s Globally-Distributed Database  (1) 2012.09.17
mongodb index tools...  (4) 2012.09.13

http://www.sqlskills.com/BLOGS/PAUL/post/Multiple-log-files-and-why-theyre-bad.aspx

Multiple log files and why they're bad

Which brings me to the second thing I care about: why was the extra log file needed in the first place? Why did the transaction log run out of space, necessitating creating another log file? That's the only explanation I can think of for having more than one log file as there is no performance gain from multiple log files - SQL Server will write to them sequentially, never in parallel.

I blogged about the Importance of proper transaction log file size management more than three years ago (and here five years back), and many others have blogged about it too, but it's still one of the most common problems I see. Log growth can easily be monitored using the Log Growths performance counter in the Databases performance object and I'm sure someone's written code to watch for the log growth counter incrementing for databases and alerting the DBA.


SQL Server는 로그 파일을 쓸때 Sequentially하게 쓴다. 그렇다면, 여러개의 로그 파일을 분리할 필요가 없겠다.

'Etc' 카테고리의 다른 글

MongoDB MMS 설치  (0) 2012.10.16
Tempdb Checkpoint  (1) 2012.10.10
Spanner: Google’s Globally-Distributed Database  (1) 2012.09.17
mongodb index tools...  (4) 2012.09.13
제 2회 mongodb tech semina 참석 후기  (0) 2012.09.13

http://research.google.com/archive/spanner.html
http://www.systemswemake.com/papers/spanner

메카톤급의 Database이네요.. NoSQL의 종결자

Spanner: Google's Globally-Distributed Database
James C. Corbett, Jeffrey Dean, Michael Epstein, Andrew Fikes, Christopher Frost, JJ Furman, Sanjay Ghemawat, Andrey Gubarev, Christopher Heiser, Peter Hochschild, Wilson Hsieh, Sebastian Kanthak, Eugene Kogan, Hongyi Li, Alexander Lloyd, Sergey Melnik, David Mwaura, David Nagle, Sean Quinlan, Rajesh Rao, Lindsay Rolig, Yasushi Saito, Michal Szymaniak, Christopher Taylor, Ruth Wang, and Dale Woodford

Abstract

Spanner is Google's scalable, multi-version, globally-distributed, and synchronously-replicated database. It is the first system to distribute data at global scale and support externally-consistent distributed transactions. This paper describes how Spanner is structured, its feature set, the rationale underlying various design decisions, and a novel time API that exposes clock uncertainty. This API and its implementation are critical to supporting external consistency and a variety of powerful features: non-blocking reads in the past, lock-free read-only transactions, and atomic schema changes, across all of Spanner.

To appear in:
OSDI'12: Tenth Symposium on Operating System Design and Implementation, Hollywood, CA, October, 2012.

Download: PDF Version

'Etc' 카테고리의 다른 글

Tempdb Checkpoint  (1) 2012.10.10
여러개 로그 파일이 좋을까???  (0) 2012.09.25
mongodb index tools...  (4) 2012.09.13
제 2회 mongodb tech semina 참석 후기  (0) 2012.09.13
MongoDB + Hadoop  (0) 2012.09.11

mongodb index tools...

안녕하세요. 주디아줌마입니다. 
인덱스 튜닝을 위해서는 인덱스별 인덱스 사이즈 확인하고 싶을 때 사용할 수 있는 툴~~

툴 소개 : https://github.com/jwilder/mongodb-tools


참고링크

CentOS 5.3 + Python 2.6 + modwsgi + django 1.1 설치
http://blog.naver.com/PostView.nhn?blogId=aries84&logNo=100157702157


인덱스 참고 자료
https://openshift.redhat.com/community/blogs/design-and-performance-tips-for-mongodb-indexes http://support.serverdensity.com/knowledgebase/articles/76002-mongodb-ram-headroomhttp://support.serverdensity.com/knowledgebase/articles/93364-mongodb-index-stats

collection_stats.py
index_stats.py
redundant_indexes.py

collection-stats.py (Collection 통계 )

 $ ./collection-stats.py

 Checking DB: examples2.system.indexes
 Checking DB: examples2.things
 Checking DB: examples1.system.indexes
 Checking DB: examples1.address
 Checking DB: examples1.typeless_address
 Checking DB: examples1.user
 Checking DB: examples1.typeless_user


 +----------------------------+--------+--------+---------+--------------+---------+------------+
 |         Collection         | Count  | % Size | DB Size | Avg Obj Size | Indexes | Index Size |
 +----------------------------+--------+--------+---------+--------------+---------+------------+
 | examples1.address          |      2 |   0.0% | 184.00b |       92.00b |    2    |     15.97K |
 | examples1.system.indexes   |      9 |   0.0% | 912.00b |      101.33b |    0    |      0.00b |
 | examples1.typeless_address |      2 |   0.0% | 216.00b |      108.00b |    1    |      7.98K |
 | examples2.system.indexes   |      2 |   0.0% | 164.00b |       82.00b |    0    |      0.00b |
 | examples1.typeless_user    | 101879 |  26.7% |  10.10M |      104.00b |    3    |      8.18M |
 | examples1.user             | 101879 |  36.0% |  13.60M |      140.00b |    3    |     15.20M |
 | examples2.things           | 100000 |  37.3% |  14.11M |      148.00b |    2    |      5.67M |
 +----------------------------+--------+--------+---------+--------------+---------+------------+
 Total Documents: 303773
 Total Data Size: 37.82M
 Total Index Size: 29.08M
 RAM Headroom: 2.87G
 RAM Used: 2.74G (61.6%)
 Available RAM Headroom: 1.10G

index-stats.py(인덱스 통계)

$ ./index-stats.py


Checking DB: examples2.system.indexes
Checking DB: examples2.things
Checking DB: examples1.system.indexes
Checking DB: examples1.address
Checking DB: examples1.typeless_address
Checking DB: examples1.user
Checking DB: examples1.typeless_user

Index Overview
+----------------------------+------------------------+--------+------------+
|         Collection         |         Index          | % Size | Index Size |
+----------------------------+------------------------+--------+------------+
| examples1.address          | _id_                   |   0.0% |      7.98K |
| examples1.address          | _types_1               |   0.0% |      7.98K |
| examples1.typeless_address | _id_                   |   0.0% |      7.98K |
| examples1.typeless_user    | _id_                   |  10.9% |      3.17M |
| examples1.typeless_user    | address_id_1           |  10.9% |      3.17M |
| examples1.typeless_user    | typeless_address_ref_1 |   6.4% |      1.85M |
| examples1.user             | _id_                   |  10.9% |      3.17M |
| examples1.user             | _types_1_address_id_1  |  13.2% |      3.84M |
| examples1.user             | _types_1_address_ref_1 |  28.2% |      8.20M |
| examples2.things           | _id_                   |  10.7% |      3.11M |
| examples2.things           | _types_1               |   8.8% |      2.56M |
+----------------------------+------------------------+--------+------------+

Top 5 Largest Indexes
+-------------------------+------------------------+--------+------------+
|        Collection       |         Index          | % Size | Index Size |
+-------------------------+------------------------+--------+------------+
| examples1.user          | _types_1_address_ref_1 |  28.2% |      8.20M |
| examples1.user          | _types_1_address_id_1  |  13.2% |      3.84M |
| examples1.typeless_user | _id_                   |  10.9% |      3.17M |
| examples2.things        | _id_                   |  10.7% |      3.11M |
| examples2.things        | _types_1               |   8.8% |      2.56M |
+-------------------------+------------------------+--------+------------+

Total Documents: 303773
Total Data Size: 37.82M
Total Index Size: 29.08M
RAM Headroom: 2.87G
RAM Used: 2.73G (61.4%)  -- 메모리 사용 비율까지.ㅋㅋ
Available RAM Headroom: 1.11G


안녕하세요. 주디아줌마입니다.
(강동운님이 정리해주신 자료에 추가한 부분입니다.)

2012.09.12일 몽고DB 기술세미나를 가졌습니다. 이번 기술 세미나는 10gen의 Mr. Chad Tinel 엔지니어분이 오셔서 QA으로 진행되었습니다. 기술문의는 chadtinel@10gen.com으로 보내주시면 응답해주신다고 합니다. (공짜는 아니에요^^) 



Q. 2.2에서 글로벌락에서 DB락으로 조정이 되었는데, 향후 Release는 어떻게 되는가?

    6개월 주기로 Release되며, 향후에는 일반 DBMS와 같이 Field Locking까지 지원이 될것이다.  3월 정도 2.4 버젼에서는 collection level로 locking으로 기대된다.  추가적으로 보안에 대해서 신경을 쓰게 되었는데 R/W에 대한 권한 조정이 가능하다. 이것은 DB마다 읽기를 가지는 권한과 쓰기를 가지는 로그인 계정이 분리가 된다는 것인데 2.4 버젼에 가능하지 않을까 싶다.



Q. 샤딩은 언제쯤 구현하면 좋은가?

100 GB 정도면 아주 작은 데이터다. 우리는 보통 20 ~ 30TB 정도 되는 데이터를 샤딩하라고 추천하고 있다.그리고 장비 한대에 300 GB RAM을 설치하는건 비용이 엄청 비싸기 떄문에 이것도 3대로 나눠서… 100GB씩 3대로 나눠서 사용하는게 비용적인 측면에서 유리하다.


Q. 도큐먼트 SIZE에 따르는 성능 수치에 대한 정보가 있는가?
없다.  변수가 다양하기 때문에 애매모호하다.

Q. System Log 분리가 가능한가? log level에 따른 남기는 정보가 틀리는데 정보좀 알려달라..
현재까지 시스템 장애 로그에 대한 분리 요청이 없었는데, 본사에 가서 제안을 해보겠다.
log level에 대한 정보 공유할 수 없다. 보통 3, 5로 레벨로 저장한다.

Q. 몽고DB는 Windows Base에 최적화하려는 생각은 있느냐?
아직까지는 없다. 미국내에서도 97%가 리눅스 Base에서 운영중에 있다.
(ㅠㅠ... 아쉽죠.. )

Q. 쓰기 위주의 log성 데이타(예, 도큐먼트 사이즈가 100G) 일때 샤딩을 고려해야 하나?
테라 바이트의 경우에도 문제 없었다. 장애를 대비해야 하기 때문에 standalone 환경 보다는 Replica-Set 환경으로 추천한다.

Q. troubleshooting을 위한 자료가 있느냐?
우리가 개발한 MMS가 있다. 이것을 이용하면 된다. 

Q. 외부 네트웤과 차단된 환경에서는 mms 사용이 불가능하지 않느냐?
  mms를 이용할 수 없는 고립된 장비들 예를들면 은행이나 증권 등등에서는 이것을 사용할 수 없기 때문에 오픈 소스로 모니터링할 수 있는 툴을 개발중이고, 향후 버전에 이걸 따로 배포할 계획이 있다.

Q. 우리는 CPU보다 메모리가 중요하다. 따라서 장비를 scaleup하기 위해서는 
메모리가 첫번째 요소다.
1순위)메모리
2순위) SSD 또는 10GB network badwidth
  RAM이 굉장히 중요하기 때문에.. 현재 사용하고 있는 데이터만큼 메모리 사이즈가 있으면 좋다. 예를들어 100G의 데이터가 있고, 이중 10G가 정도만 메모리에 올라가 있는 상태라면 최소 10G 이상의 램을 가지고 있어야 한다.

CPU의 성능은 많이 차이가 없다. 2개면 충분하다. 

Q. 맴리듀스에서 병렬처리가 가능한지
몽고디비는 맵리듀스가 느리기 때문에 하둡 Plug-in을 제공한다. 몽고DB->하둡, 하둡-> 몽고DB로 넣을 수 있는 plugin을 지원한다. 
http://www.10gen.com/presentations/mongodb-philly/2012/mongodb-hadoop

Q. middle layer에 cash 용도로 Redis를 사용 많이하는데 이제는 제거해도 되나?
제거 해도 된다. 
[발 번역] 잘가~~ Global Lock, MongoDB 2.0 vs 2.2

Q. 백업 어떻게 하는게 최상의 조건인가?
  대부분의 사람들은 db lock을 싫어한다. 왜냐하면 db에 lock을 걸게 되면 write가 안되기 때문이다. 그렇지만 우리는 이런 방법으로 컨설팅을 주도해 나가고 있으며, 복제 셋을 기반으로 db lock을 걸어 데이터를 퍼가던지, 파일을 복사하는 그런 형태로 컨설팅을 안내하고 있다.

Q. 타 RDBMS처럼 POINT BACKUP이 가능한가?
(여기서 POINT BACKUP이란 특정한 시간을 지정해서 백업을 하는 시스템 예를들어 새벽4시)
샤드가 된 서버들은 각각 관리가 되기 때문에 이거는 불가능 하다. 따라서 개별적으로 디비에 LOCK을 걸어 복사하는 형태를 취하는 것이 좋다.

Q. 장비가 3대가 늘어나면 INSERT 속도가 증가하는가?
    현재로 말씀드릴 수 있는건 산술적으로 늘어나는 것이기 때문에 그건 맞다고 볼 수 있다.

Q. 청크가 64 MB라서.. 이게 이동이 되다보면 서비스 라인에 지장을 줄 수 있는데 이걸 따로 보내기 위한 private network를 구성할 계획이 있는가?  
   좋은 질문이다. 하지만 현재로써는 10gen 고려되지 않고 있다. 다만 말씀드릴 수 있는건 10 GB network bandwidth를 쓰라고 조언해드릴 수 있다.

Q. 시간 단위 복구가 가능한가?
   Replica-Set으로 구성해서 SlaveDelay 옵션으로 private와 slave와의 동기화 시간을 조정해서 사용한다. 단, oplog가 커야 한다. oplog를 백업해서 1시간 이전의 데이타로 복구할 수 있다. (주디아줌마: 이건 나중에 한번 테스트 해봐야겠다.)


'Etc' 카테고리의 다른 글

Spanner: Google’s Globally-Distributed Database  (1) 2012.09.17
mongodb index tools...  (4) 2012.09.13
MongoDB + Hadoop  (0) 2012.09.11
sql agent에 할당된 max worker thread 수는 얼마일까?  (0) 2012.09.10
mongodb assert log debugging 방법  (0) 2012.09.07

MongoDB + Hadoop


몽고디비 스터디 다음주제를 하둡과의 만남을 주제로 해볼까? ㅋㅋ



'Etc' 카테고리의 다른 글

mongodb index tools...  (4) 2012.09.13
제 2회 mongodb tech semina 참석 후기  (0) 2012.09.13
sql agent에 할당된 max worker thread 수는 얼마일까?  (0) 2012.09.10
mongodb assert log debugging 방법  (0) 2012.09.07
MongoDB Manual  (2) 2012.09.06

안녕하세요. 주디아줌마입니다.

max work thread가 도달할 경우 아래와 같이 에러가 기록이 된다.

http://support.microsoft.com/kb/306457

-- 현, 시스템의 Max workder
select *
from sys.configurations
where configuration_id = 503

--configuration_id	name	value	minimum	maximum	value_in_use	description	is_dynamic	is_advanced
--503	max worker threads	0	128	65535	0	Maximum worker threads	1	1

-- SQL Agent JOB에 할당된 정보
exec msdb.dbo.sp_enum_sqlagent_subsystems

--subsystem	description	subsystem_dll	agent_exe	start_entry_point	event_entry_point	stop_entry_point	max_worker_threads	subsystem_id
--ActiveScripting	액티브 스크립팅 하위 시스템	C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Binn\SQLATXSS.DLL	NULL	ActiveScriptStart	ActiveScriptEvent	ActiveScriptStop	40	2
--ANALYSISCOMMAND	분석 명령 하위 시스템	C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Binn\SQLOLAPSS.DLL	NULL	OlapStart	OlapCommandEvent	OlapStop	400	10
--ANALYSISQUERY	분석 쿼리 하위 시스템	C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Binn\SQLOLAPSS.DLL	NULL	OlapStart	OlapQueryEvent	OlapStop	400	9
--CmdExec	명령줄 하위 시스템	C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Binn\SQLCMDSS.DLL	NULL	CmdExecStart	CmdEvent	CmdExecStop	40	3
--PowerShell	PowerShell 하위 시스템	C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Binn\SQLPOWERSHELLSS.DLL	C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\SQLPS.exe	PowerShellStart	PowerShellEvent	PowerShellStop	2	12
--SSIS	SSIS 패키지 실행 하위 시스템	C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\Binn\SQLDTSSS.DLL	C:\Program Files\Microsoft SQL Server\110\DTS\Binn\DTExec.exe	DtsStart	DtsEvent	DtsStop	400	11
--TSQL	Transact-SQL 하위 시스템	[내부]	[내부]	[내부]	[내부]	[내부]	80	1

-- 모든 사용 가능한 SQL Server 에이전트 프록시 하위 시스템에 대한 정보
select 
	subsystem
	, max_worker_threads
from msdb.dbo.syssubsystems
go

--subsystem	max_worker_threads
--TSQL	80
--ActiveScripting	40
--CmdExec	40
--Snapshot	400
--LogReader	100
--Distribution	400
--Merge	400
--QueueReader	400
--ANALYSISQUERY	400
--ANALYSISCOMMAND	400
--SSIS	400
--PowerShell	2

'Etc' 카테고리의 다른 글

제 2회 mongodb tech semina 참석 후기  (0) 2012.09.13
MongoDB + Hadoop  (0) 2012.09.11
mongodb assert log debugging 방법  (0) 2012.09.07
MongoDB Manual  (2) 2012.09.06
truncate table시 SCH-M lock 이 걸린다.  (0) 2012.09.06