운영관리

Windows 서버에서 [장치에 쓰기 캐싱 사용] 설정/해제에 따른 성능 차이

by 이용미 posted Jun 30, 2012

1. Test 내용

Windows의 경우, [장치에 쓰기 캐싱 사용] 설정/해제에 따라 성능차이가 난다. Test에서는 앞의 설정에 따른 insert, select 그리고 data delete 할 때 compactdb의 성능 차이를 알아본다.

 

2. Test 결론

100만건을 insert 하였을 때, 위의 옵션을 해제 하였을 때가 약 1 40초 가량, 100건을 select 하였을 때에는 옵션을 설정하였을 때 약 0.1초 더 나은 성능을 보여주었다. 또한, compactdb에서는 옵션을 해제하였을 때, 평균 30초가량(최소 : 11.08, 최대 : 63.83) 나은 성능을 보여주었다.

- 옵션 해제가 더 나은 성능을 나타낸 경우 : insert, compactdb

- 옵션 설정이 더 나은 성능을 나타낸 경우 : select

 

Test한 결과를 첨부하였다.

- insert, select 결과

옵션 시간

Start

End

Average

Elasped

Insert

[설정]

10:16:41.202

10:28:00.348

679.099

00:12:59.146

[해제]

15:10:13.694

15:21:33.235

697.353

00:11:19.541

select

[설정]

10:34:02.704

10:34:02.873

0.00141

00:00:00.169

[해제]

15:23:31.189

15:23:31.470

0.00266

00:00:00.281

 

- compactdb 결과

"..._1" : 첫번째 수행, "..._2" : 두번째 수행을 의미

옵션

[설정]

[해제]

차이

100만건

Compactdb_1

Start : 10:43:01.74

End : 10:43:40.24

Elasped : 00:00:38.50

Start : 15:26:02.75

End : 15:26:28.74

Elasped : 00:00:25.99

00:00:12.51

70만건

Compactdb_1

Start : 10:48:56.13

End : 10:49:33.59

Elasped : 00:00:77.46

Start : 16:48:36.78

End : 16:49:02.29

Elasped : 00:00:65.51

00:00:11.95

Compactdb_2

Start : 10:50:13.96

End : 10:50:52.98

Elasped : 00:00:39.02

Start : 16:49:22.85

End : 16:49:49.21

Elasped : 00:00:26.36

00:00:12.66

40만건

Compactdb_1

Start : 10:55:34.34

End : 10:56:18.58

Elasped : 00:00:84.24

Start : 16:52:27.63

End : 16:52:48.04

Elasped : 00:00:20.41

00:00:63.83

Compactdb_2

Start : 10:56:49.52

End : 10:57:22.87

Elasped : 00:00:73.35

Start : 16:53:07.21

End : 16:53:29.22

Elasped : 00:00:22.01

00:00:51.34

0

Compactdb_1

Start : 11:12:35.28

End : 11:13:12.66

Elasped : 00:00:77.38

Start : 16:57:40.76

End : 16:58:07.06

Elasped : 00:00:66.30

00:00:11.08

Compactdb_2

Start : 11:13:45.59

End : 11:14:21.08

Elasped : 00:00:75.49

Start : 16:58:30.24

End : 16:58:47.48

Elasped : 00:00:17.24

00:00:58.25

 

3. Test 상세 내용

. Test 장비 사양

- Windows Server Standard Service Pack 1

- Processor : Intel(R) Xeon(R) CPU 5130 @2.00GHz 2.00GHz(2processors)

- Memory : 8.00 GB

- System type : 32-bit Operating System

 

. CUBRID Version

CUBRID 2008 R4.0 (8.4.0.2027) (32bit release build for Windows_NT) (Oct 25 2011 16:23:30)

 

. 옵션 설정

[컴퓨터] 우클릭 – [관리] – [시스템도구] – [장치관리자] – [디스크드라이브] 확장 – […. Device] 우클릭 – [속성] – [정책] – [쓰기 캐싱 정책] – [장치에 쓰기 캐싱 사용]에서 설정/해제가 가능하다.

 

. 진행 순서

아래 Test 진행 방법은 장치에 쓰기 캐싱을 설정/해제하였을 때, 각각 진행

1) java 프로그램을 이용하여 insert 진행 : 100만건 insert

2) java 프로그램을 이용하여 select 진행 : 100 select

3) 배치파일(이하 test.bat)을 이용하여 compactdb – spacedb – compactdb 차례로 수행 : data 100만건

4) 30만건을 delete로 삭제 후, select count(*)로 남은 data 수 확인

5) test.bat 수행 : data 70만건

6) 30만건을 delete로 삭제 후, select count(*) 로 남은 data 수 확인

7) test.bat 수행 : data 40만건

8) 40만건을 delete로 삭제 후, select count(*) 로 남은 data 수 확인

9) test.bat 수행 : data 0

 

. DB 생성 및 Table 생성 방법

cubrid created –db-page-size=4K –log-page-size-4K tdb

cubrid addvoldb –p data –S –db-volume-size=500M tdb

cubrid addvoldb –p index –S –db-volume-size=500M tdb

 

create table tbl1(id varchar(10) primary key, name char(50), addr char(100), phone varchar(20), age int, sex varchar(1), cellular varchar(20));

create index idx1 on tbl1(name, id);

 

. test.bat 내용

echo %time%

cubrid compactdb –S tdb

echo %time%

cubrid spacedb –S –size-unit=PAGE tdb

echo %time%

cubrid compactdb –S tdb

echo %time%


Articles

1 2 3 4 5 6 7 8 9 10