jump to navigation

What is SAP/ASE-IMDB March 26, 2012

Posted by Mich Talebzadeh in ASE-IMDB.

SAP/ASE has introduced in-memory database (ASE-IMDB) as part of its 15.5 release. The origin of ASE-IMDB goes back to days when Sybase was working on Real Analytics Platform (RAP). Although this is the first time that ASE has a licensed IMDB product.

Like Oracle in-memory database TimesTen, ASE-IMDB is a high performance database. ASE-IMDB is fully integrated within ASE itself. This is in contrast to TimesTen which is basically a standalone database. ASE-IMDB can read and write data to other databases on the same ASE, can receive data from other ASE or non ASE databases Enterprise Connect Data Access (ECDA). ASE-IMDB can also use replication to receive data from all these sources. Figure 1 shows a simplified diagram of ASE 15.5 shared memory IMDB component.

ASE classic databases are designed for applications that need to strictly adhere to ACID (atomicity, consistency, isolation, durability) transaction semantics. These ACID properties are implemented by means of a write-ahead transaction log, located on a persistent storage (i.e. disk). In this respect, ASE-IMDB allows the durability and atomicity aspects of transactional behaviour to be relaxed in exchange for lower response times and higher throughput. This is in contrast to TimesTen that adheres fully to ACID properties.

To have an ASE-IMDB you will require to have enough cache (part of memory in ASE) to dedicate it to hold the entire IMDB in memory. Once this dedicated cache is created, it will act as placeholder for devices for the IMDB and a database can be created on these in-memory devices. ASE-IMDB is created based on an available template database as shown in Figure 2. A template database is a classic ASE database. At start-up ASE-IMDB will inherit all objects and data from its template database. A typical syntax for creating an ASE-IMDB would be:

create inmemory database ASEIMDB
use ASEIMDB_template as template
on ASEIMDB_data01='4000M'
log on ASEIMDB_log01='1000M'
with durability = no_recovery

The approach is neat and requires very little new learning for database administrators. Note that in the above syntax there is an explicit reference to a template database ASEIMDB_template in this case. Also durability has to be no recovery. The implication of this type of durability is important. It means that ASE-IMDB databases are not recoverable. All contents of an ASE-IMDB are therefore lost after cycling the ASE server or an unexpected shut down, because of the absence of persistent storage. On the other hand, this has allowed Sybase to optimize transaction logging (which still happens, but fully in-memory); since an IMDB never needs to be recovered from its transaction log when ASE reboots, various optimization is carried out in order to deliver better transactional scalability and performance.

The following characteristics are valid for an ASE-IMDB:

  • Extremely easy to set-up without any learning curve
  • Read performance and more importantly write performance as there is no data or log flushing to disk
  • Sybase have modified ASE-IMDB internal logic to eliminate irrelevant processing. These include LRU/MRU chain of pages, large I/O buffer pools, wash marker, asynchronous prefetch, and buffer replacement policy.
  • The most visible change that the optimizer has made for IMDB is costing the plan assuming the user IMDB object is fully cached in memory (i.e. the physical IO cost for the object access is 0).
  • The transaction log is moved from disk to in-memory, and Sybase have done some excellent optimizations on transaction logging for IMDB, again, avoiding irrelevant processing.
  • ASE-IMDB appeal lies in its ability to seamlessly integrate with other classic databases. You can even load/import an ASE-IMDB database from a disk resident database with minimal impact
  • ASE-IMDB can also be used as a scalable, resilient, in-memory object cache
  • Since ASE-IMDB is part of a conventional ASE, it can handle up to 32000 user connections.


No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: