성능중심어플리케이션을위한실시간 Data 처리방안 Oracle TSC DB Tech. Lee Sung Jin (sungjin.lee@oracle.com)
Content & Intent 1 2 3 4 IMDB의특징및필요성 Oracle이제공하는 IMDB, TimesTen IMDB, Disk DB간비교국내적용사례 -2-
I. IMDB 의특징및필요성 I. IMDB 의특징및필요성 -3-
I. IMDB 의특징및필요성 IMDB(In Memory DB) 란? Database on Main Memory 시스템구동시 DB 전체를메인메모리에상주 메모리상의데이터만을이용하므로고성능처리가가능 데이터의메모리 100% 상주기반으로설계된 DBMS IMDB 대중화배경 디스크 I/O에의한성능저하 상용화된 64-Bit Systems의출현 메모리가격하락 빠른응답을요구하는실시간시스템증대 Real-Time 초고속처리에적합 I/O성능- Hard Disk:5~10ms, S-RAM:8~35ns, D-RAM: 90~120ns Disk 기반 DBMS 보다 10 배빠른성능제공 -4-
I. IMDB 의특징및필요성 IMDB 를통한고성능데이터처리 고성능데이터처리시스템? 적은비용으로많은 SQL 문을빠르게처리 처리성능비교 : HP9000 rp8420(risc) 4CPU/ 32G Disk DB 설정 : Buffer Keep 기능을이용 (Data 를메모리버퍼에상주시킨후성능측정 ) 예시 ) 12,000TPS 시스템구축비용 (Tx 비율 select : update = 4:1) 동일 H/W에서 TimesTen 을이용하여 4배이상의고성능시스템구축가능 * CPU : 메모리 DB 사용시적은수의 CPU로목표성능시스템구축 * Memory Size : 데이터량보다많은물리적메모리필요, but 메모리가격은매년하락 * S/W 비용 : CPU 수절감에따른 s/w 구매비용절감 * 유지보수 : 메모리상주로인한 DB tuning 작업관리비용감소 -5-
I. IMDB 의특징및필요성 IMDB 적용분야 메모리상에서전체데이터베이스를관리하므로초고속고성능의실시간 (Real-Time) 트랜잭션처리를필요로하는 Performance Critical 한모든사업분야 높은읽기처리량이필요한분야 Peak Time 처리량이상대적으로매우높은애플리케이션 고가용성을갖추고, 높은쓰기처리량이필요한분야 빠른응답시간이필요한분야 심각한성능문제를안고있는기존애플리케이션 기존데이터베이스를유지하면서, hot 데이터에대한캐시기능이필요한부분 -6-
II. Oracle 이제공하는 IMDB, TimesTen II. Oracle이제공하는 IMDB, TimesTenT -7-
II. Oracle 이제공하는 IMDB, TimesTen TimesTen 이란? MMDB product from Oracle 전세계시장점유율1위 전세계 500 여개이상의기업에서사용중 Product Version 8 (2009.1 출시예정 ) 실시간데이터관리소프트웨어 즉각반응 고확장성 고가용성 고성능이요구되는 Application 내의이벤트, 트랜잭션, 데이터관리 -8-
II. Oracle 이제공하는 IMDB, TimesTen TimesTen 제품구성 TimesTen IMDB Real-Time Database System Real-time data management for applications requiring exceptional performance Network Replication Real-Time Database System with Replication Real-time data management, and replication, for applications requiring exceptional performance, with the failover, recovery, and evolution of databases with minimal downtime Network Cache Connect Real-Time Dynamic Data Cache Real-time relational processing of selected data from an Oracle database, including automatic data loading and update synchronization Network DataServer DataServer Primary B DataServer Subscriber(s) Cache Typical Uses: Network Equipment & Systems Value-Added Services Reference Data Typical Uses: Network Equipment & Systems Value-Added Services Reference Data Typical Uses: Application Server Acceleration Enterprise App Acceleration Application-Tier Data Caching -9-
II. Oracle 이제공하는 IMDB, TimesTen 빠른응답시간보장 Average Response Times TimesTen/DataServer 5.1 IBM eserver pseries 630, 4-CPU, 1.2 GHz POWER4 AIX 5.2, 64-bit 40 s Micro osecond 35 30 25 20 15 10 37 36 100% Updates 100% Inserts 100% Reads 15 5 0 Database Operation -10-
II. Oracle 이제공하는 IMDB, TimesTen 비교할수없는성능, Direct Access 로실현 TimesTen 만이제공하는 Direct Access 모드는 TimesTen 과사용자 Application 프로세스간 Direct 통신방식을 Network 통신과 IPC(Inter Process Communication) 가갖는 Overhead를제거하여동종의 MMDBMS 보다더빠른성능을제공. 사용자응용프로그램 Seconds400,000 Transaction For 450,000 350,000 300,000 250,000 200,000000 150,000 100,000 50,000 0 Direct TCP(local) TCP(Remote) C/S 대비약 2 배이상 Select Insert Update Delete JDBC ODBC SQL92 1 2 Direct TCP(local) TCP(Remote) Select 441,066 107,334 74,696 Insert 164,942 78,369 32,742 Update 97,601 70,402 34,901 Delete 165,964 90,614 25,865-11-
II. Oracle 이제공하는 IMDB, TimesTen 고가용성, 고확장성 - Replication Network N-way, peer-to-peer Active/standby or Application n-tier Platforms Application Program TimesTen In-Memory Database Application Program TimesTen In-Memory Database active/active, multi-level l l Data Store / 테이블수준정의 동기 / 비동기전송 자동복구 데이터충돌감지및처리 Replication TimesTen to TimesTen -12-
II. Oracle 이제공하는 IMDB, TimesTen Oracle DBMS 와유기적연동 오라클테이블전체또는부분데이터를 Caching Read-only or updateable 양방향데이터전송 From TimesTen to Oracle From Oracle to TimesTen Async or sync write-through 하나의오라클 DB에다중Data Store 가능 Replication option과연동하여사용가능 설정이간편 SQL로정의/ 구현 -13-
II. Oracle 이제공하는 IMDB, TimesTen 타 IMDB 와성능비교 -14-
II. Oracle 이제공하는 IMDB, TimesTen 타 IMDB 와성능비교 (TPC-C Benchmark) 140,000 Total Average Transaction Throughput (No Replication) TimesTen Altibase 타 IMDB Sun Solaris Environment tpmc 120,000 100,000000 80,000 60,000 40,000 20,000 0 InBox_Direct InBox_IPCIPC OutBox_TCP Process H/W Model : Sun SPARC Enterprise M9000 Processor : 4xSPARC64 VI Dual- Core 2.28GHz ( 8core/16thread) Memory: 32GB(16x2048), DDR-2 Memory O/S : SUN OS 5.1 Disk : 2Gbit Fiber Channel 500G External Storage Network : 2x 10/100/1000 Mbps Ethernet -15-
II. Oracle 이제공하는 IMDB, TimesTen Direct Access (ODBC & JDBC) 타 IMDB 대비 TimesTen 의장점 타 IMDB 보다 2 배의빠른성능을보장 Transaction 의선별적 Durability 제공 성능과안정성을동시보장 High Availability Replication( 복제 ) 시데이터동기화방식 (Sync /Async) 의혼용을허용함으로데이터의안정성및성능을동시보장 Replication의특정노드복구시1라인의커맨드로수행되는복구기능제공 (Duplication) Oracle RAC 의특정노드에대한장애시자동복구 Oracle DB 와의연동성 In-Memory Database Cache 옵션은간단한 SQL 구문 (Create Cache) 을통해 TimesTen과 Oracle DB간데이터교환기능을제공 -16-
III. IMDB, Disk DB 비교 III. IMDB, Disk DB 비교 -17-
III. IMDB, Disk DB 비교 Data 처리방법 Memory-resident Data Disk-resident Data -18-
III. IMDB, Disk DB 비교 Finding a Row of Data in TimesTen -19-
III. IMDB, Disk DB 비교 Finding a Row of Data in RDBMS -20-
III. IMDB, Disk DB 비교 TimesTen s Direct Access 장점 Oracle-TimesTen In-Memory Database Conventional RDBMS Applications ODBC/Native API Applications Connection 부하 (IPC) ODBC API TimesTen DBMS 엔진 Disk-based RDBMS 추가기능에대한부하 데이터주소변환부하 메모리복사부하 Embeddable: 20-30MB Direct-Linked Memory-Tuned Data Layout Disks to Ensure Durability/Recovery 버퍼관리부하 I/O 부하 -21-
III. IMDB, Disk DB 비교 TimesTen VS Oracle Characteristic Oracle TimesTen Data Model Relational: SQL Relational: SQL Target Applications Mission-critical Mission-critical Optimization Disk-centric Memory-centric Typical deployment Database tier Application tier Architecture Client/Server Direct data access Response Times Milliseconds Microseconds Data Capacity Tens of terabytes Tens of gigabytes Scalability Unlimited SMP/cluster Good SMP -22-
III. IMDB, Disk DB 비교 350,000 Performance: Higher Throughput Transaction Throughput TimesTen/DataServer 5.1 IBM eserver pseries 670, 12-CPU 1.1 GHz POWER4 AIX 5.2, 64-bit ons Per Seco ond Transacti 300,000 250,000 200,000 150,000000 100,000 12-CPU System 100% Reads 70-20-10 Mix 100% Inserts 100% Deletes 100% Updates RDBMS 100% Reads 314,076 208,569 107,062 95,540 50,000000 54,856 0 1 2 4 6 8 10 12 Number of Application Processes -23-
III. IMDB, Disk DB 비교 Telecom Benchmark - Configurations Home Location Registry (HLR) application Oracle Three-tier architecture Benchmark application running in middle tier Oracle + TimesTen Three-tier architecture Benchmark application running in middle tier TimesTen 7.0 embedded in benchmark application Updatable cache containing benchmark data Environment RAM: 2GB Processors: Intel Xeon 3GHz hyper-threading * 2 OS: Red Hat Enterprise Linux 4.0 1 Delete 3 Select 1 Insert 2 Update transactions Delete call forwarding Get access data Get basic subscriber data Get new destination Insert call forwarding Update subscriber data Update subscriber location -24-
II. Performance Telecom Benchmark - Transaction Response Time -25-
II. Performance Telecom Benchmark - Transaction Throughput -26-