|
![]() ![]()
|
Berkeley DB supports RAM-only configurations, however, Berkeley DB does not guarantee writes will never be attempted to disk.
(버클리 디비는 램 디비를 지원한다.)
You can configure RAM-only databases by not specifying a physical file name to the DB->open method. Databases created in this way will never be written to disk unless Berkeley DB runs out of cache space. Running out of cache space happens when the application attempts to create a new database page and there is no spare room in the cache, nor is there a clean page which can simply be evicted from the cache, and a dirty page must be written from the cache to disk to make room to create the new page. When Berkeley DB runs out of cache space, it will attempt to create a temporary backing file to make new room in the cache, which is not what you want.
(램 디비를 DB->open 메소드의 물리적 파일 이름을 주지 않음으로써 설정할 수 잇다.케시가 차기 전까지는 램디비는 디스크에 써지지 않는다.캐시를 넘어서는것은 애플리케이션이 새로운 디비페이지 생성을 시도할때 케시에 공간이 없을때 발생한다.그리고 dirty페이지는 새로운 페이지생성을 위한 공간을 만들기 위해 케시로부터 디스크에 써져야 한다.버클리디비가 케시공간을 넘어설때 이것은 임시 캐시에 새로운 공간을 만들기 위해 임시 백킹파일을 생성한다.이것은 여러분이 원하지 않았던 것이다. )
You can create RAM-only database environments (in which you can work with both RAM-only and disk-backed databases) in two different types of memory: in heap memory or in system shared memory. To create the database environment in heap memory, specify the DB_PRIVATE flag to the DB_ENV->open method. Database environments created in heap memory are only accessible to the threads of a single process, however. To create the database environment in system shared memory, specify the DB_SYSTEM_MEM flag to the DB_ENV->open method. Database environments created in system memory are accessible to multiple processes. However, database environments created in system shared memory do create a small (roughly 8 byte) file in the file system read by the processes to identify the system shared memory segments to use.
(램디비 환경(이환경안에서 램 디비,디스크 백킹 디비가 작동)은 메모리의 두개의 다른타입과 동작할 수 있다: 힙과 시스템 공유메모리.디비환경을 힙에 생성하기 위해서는 DB_ENV->open ( DB_PRIVATE flag )를 설정한다.생성된 디비환경은 싱글 프로세스의 스레드에 의해 오직 접근가능하다.그러나 시스템 공유메모리에 디비환경을 만들기 위해서는 DB_ENV->open(DB_ENV->open)을 설정한다.시스템공유메모리에 생성된 디비환경은 멀티 프로세스에 의해 접근가능하다.그러나 이것은 사용되는 시스템 공유 메모리세그먼트를 구별하기 위해 프로세스에 의해 읽어들이는 8바이트의 작은 파일을 파일시스템에 생성한다.)
Finally, if your database environment is intended to be transactionally protected or recoverable after application or system failure (that is, if you configure either the locking or transaction subsystems in the database environment), both the databases and database environment log files must be written to disk. There is currently no way in the Berkeley DB database environment to support transactions without writing log files to disk.
(마지막으로 만약 디비환경이 트랙잭션으로 보호되어야 하거나 애플리케이션또는 시스템 실패후에 복구를 원한다면(즉 락이나 트랙젝션을 걸었다면) 디비와 디비환경로그파일은 디스크에 써져야 한다.디스크에 파일을 쓰는것 외에는 현재 트랜젝션을 지원하는 다른 방법은 없다.)
![]() ![]()
|
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.