Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

In-memory database

From Wikipedia, the free encyclopedia
Database management system that primarily relies on main memory for computer data storage

Anin-memory database (IMDb, ormain memory database system (MMDB) ormemory resident database) is adatabase management system that primarily relies onmain memory forcomputer data storage. It is contrasted with database management systems that employ adisk storage mechanism. In-memory databases are faster than disk-optimized databases because disk access is slower than memory access and the internal optimization algorithms are simpler and execute fewer CPU instructions. Accessing data in memory eliminatesseek time when querying the data, which provides faster and more predictable performance than disk.[1][2]

Applications where response time is critical, such as those running telecommunications network equipment andmobile advertising networks, often use main-memory databases.[3] IMDBs have gained much traction, especially in thedata analytics space, starting in themid-2000s – mainly due to multi-core processors that can address large memory and due to less expensiveRAM.[4][5]

A potential technical hurdle with in-memory data storage is the volatility of RAM. Specifically in the event of a power loss, intentional or otherwise, data stored involatile RAM is lost.[6] With the introduction ofnon-volatile random-access memory technology, in-memory databases will be able to run at full speed and maintain data in the event of power failure.[7][8][9]

ACID support

[edit]
See also:Atomicity, consistency, isolation, durability

In its simplest form, main memory databases store data onvolatile memory devices. These devices lose all stored information when the device loses power or is reset. In this case, IMDBs can be said to lack support for the "durability" portion of theACID (atomicity, consistency, isolation, durability) properties. Volatile memory-based IMDBs can, and often do, support the other three ACID properties of atomicity, consistency and isolation.

Many IMDBs have added durability via the following mechanisms:

  • Snapshot files, or,checkpoint images, which record the state of the database at a given moment in time. The system typically generates these periodically, or at least when the IMDb does a controlled shut-down. While they give a measure of persistence to the data (in that the database does not lose everything in the case of a system crash) they only offer partial durability (as "recent" changes will be lost). For full durability, they need supplementing with one of the following:
  • Transaction logging, which records changes to the database in a journal file and facilitates automatic recovery of an in-memory database.
  • Non-Volatile DIMM (NVDIMM), a memory module that has a DRAM interface, often combined with NAND flash for the Non-Volatile data security. The first NVDIMM solutions were designed withsupercapacitors instead of batteries for the backup power source. With this storage, IMDb can resume securely from its state upon reboot.
  • Non-volatile random-access memory (NVRAM), usually in the form of static RAM backed up with battery power (battery RAM), or an electrically erasable programmable ROM (EEPROM). With this storage, the re-booting IMDb system can recover the data store from its last consistent state.
  • High availability implementations that rely on databasereplication, with automaticfailover to an identical standby database in the event of primary database failure. To protect against loss of data in the case of a complete system crash, replication of an IMDb is normally used in addition to one or more of the mechanisms listed above.

Some IMDBs allow the database schema to specify different durability requirements for selected areas of the database – thus, faster-changing data that can easily be regenerated or that has no meaning after a system shut-down would not need to be journaled for durability (though it would have to be replicated for high availability), whereas configuration information would be flagged as needing preservation.

Hybrids with on-disk databases

[edit]

While storing data in-memory confers performance advantages, it is an expensive method of data storage. An approach to realising the benefits of in-memory storage while limiting its costs is to store the most frequently accessed data in-memory and the rest on disk. Since there is no hard distinction between which data should be stored in-memory and which should be stored on disk, some systems dynamically update where data is stored based on the data's usage.[10] This approach is subtly different fromcaching, in which the mostrecently accessed data is cached, as opposed to the mostfrequently accessed data being stored in-memory.

The flexibility of hybrid approaches allow a balance to be struck between:

  • performance (which is enhanced by sorting, storing and retrieving specified data entirely in memory, rather than going to disk)
  • cost, because a less costly hard disk can be substituted for more memory
  • persistence
  • form factor, because RAM chips cannot approach thedensity of a small hard drive

In thecloud computing industry the terms "data temperature", or "hot data" and "cold data" have emerged to describe how data is stored in this respect.[11] Hot data is used to describe mission-critical data that needs to be accessed frequently while cold data describes data that is needed less often and less urgently, such as data kept for archiving or auditing purposes. Hot data should be stored in ways offering fast retrieval and modification, often accomplished by in-memory storage but not always. Cold data on the other hand can be stored in a more cost-effective way and is accepted that data access will likely be slower compared to hot data. While these descriptions are useful, "hot" and "cold" lack concrete definitions.[11]

Manufacturing efficiency provides another reason for selecting a combined in-memory/on-disk database system. Some device product lines, especially inconsumer electronics, include some units with permanent storage, and others that rely on memory for storage (set-top boxes, for example). If such devices require a database system, a manufacturer can adopt a hybrid database system at lower andupper cost, and with less customization of code, rather than using separate in-memory and on-disk databases, respectively, for its disk-less and disk-based products.

The firstdatabase engine to support both in-memory and on-disk tables in a single database, WebDNA, was released in 1995.

Storage memory

[edit]

Another variation involves large amounts of nonvolatile memory in the server, for example, flash memory chips as addressable memory rather than structured as disk arrays. A database in this form of memory combines very fast access speed with persistence over reboots and power losses.[12]

Notable In-memory Databases

[edit]
  • SAP HANA: This is a column-orientated in-memory database that stores data in its memory instead of keeping it on a disk. It claims to store data in columnar fashion in main memory and supports bothonline analytical processing (OLAP) andonline transactional processing (OLTP) in the same system.[13]
  • Oracle TimesTen: This is an In-Memory Database which is memory-optimized, relational database that claims to deliver microsecond response and extremely high throughput performance.[14]

See also

[edit]

Notes

[edit]
  1. ^"Definition: in-memory database". WhatIs.com. Retrieved19 January 2013.
  2. ^Michael Vizard."The Rise of In-Memory Databases". Slashdot. Archived fromthe original on 1 February 2013. Retrieved19 January 2013.
  3. ^"TeleCommunication Systems Signs up as a Reseller of TimesTen; Mobile Operators and Carriers Gain Real-Time Platform for Location-Based Services".Business Wire. 2002-06-24.
  4. ^"Falling RAM Prices Drive In-Memory Database Surge". SAP. Archived fromthe original on 4 November 2013. Retrieved19 January 2013.
  5. ^"Rise of In-Memory Databases Impacts Wide Range of Jobs".Dice.com. July 13, 2012.
  6. ^Steel, Chris (18 February 2015)."In-memory computing: what happens when the power goes out?". RetrievedMarch 10, 2017.
  7. ^Historically, RAM was not used as a persistent data store and therefore data loss in these instances was not an issue.Whole-system Persistence with Non-volatile Memorieshttp://research.microsoft.com/apps/pubs/default.aspx?id=160853
  8. ^The Bleak Future of NAND Flash Memoryhttp://research.microsoft.com/apps/pubs/default.aspx?id=162804
  9. ^AGIGARAM NVDIMM saves data through system failurehttps://www.embedded.com/electronics-products/electronic-product-reviews/real-time-and-performance/4422291/AGIGARAM-NVDIMM-saves-data-through-system-failure
  10. ^Brust, Andrew (8 May 2013)."Teradata enters the in-memory fray, intelligently".ZDNet. RetrievedJuly 28, 2017.
  11. ^abClancy, Molly (10 August 2023)."What's the Diff: Hot and Cold Data Storage". RetrievedJuly 28, 2017.
  12. ^Mellor, Chris (30 January 2013)."Truly these are the GOLDEN YEARS of Storage".The Register.
  13. ^"What is SAP HANA?".SAP. Retrieved2024-08-01.
  14. ^"Oracle TimesTen In-Memory Database".

References

[edit]
  • Jack Belzer (April 1980).Encyclopedia of Computer Science and Technology - Volume 14: Very Large Data Base Systems to Zero-Memory and Markov Information Source. Marcel Dekker Inc.ISBN 978-0-8247-2214-2.
Retrieved from "https://en.wikipedia.org/w/index.php?title=In-memory_database&oldid=1331609696"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp