Sei sulla pagina 1di 7

INNODB ENGINE

© eClinicalWorks, Westborough, MA. All Rights Reserved. August 2010.


InnoDB Engine

CONTENTS
 

InnoDB Engine ______________________________________________ 3 

Why Use the InnoDB Engine? ________________________________________ 3 


Why Move to 64-Bit? _______________________________________________ 5 
Why a Physical Database Server? _____________________________________ 5 

Notices ____________________________________________________ 7 

Trademarks ______________________________________________________ 7 

Why Use the InnoDB Engine?ƒ 2


InnoDB Engine

INNODB ENGINE
Why Use the InnoDB Engine?
eCW currently uses MyISAM as the default engine on the database
server. You should consider replacing this database storage engine
with the InnoDB storage engine.
Configuring the database using the InnoDB engine has the
following advantages:
1. Row-Level Locking
InnoDB uses row-level locking when reading the database. This
is a major advantage as compared to MyISAM, which uses
table-level locking.
This advantage is clear when a long running query such as lab
list lookup, accounts lookup, or claims lookup runs on the
database server. Such queries may run for a significant
amount of time. In MyISAM, such a query may result in a
global locking result, which may cause the application to freeze.
InnoDB, using row-level locking, would allow this query to run
while simultaneously allowing other incoming queries on the
same table to be executed. This completely resolves global
freezing scenarios that may otherwise occur when queries that
include elements such as large date ranges are submitted on
the database.
2. Tables In Memory (Buffer Pool)
InnoDB uses a memory area called a buffer pool, where tables
can be loaded. InnoDB loads the table data as well as indexes
in this buffer pool. This is different from MyISAM, which loads
only the indexes in memory (in the area called the key buffer).
Since InnoDB loads data as well as indexes in memory, a larger
buffer pool would be needed to hold the database in memory as
the database size increases. With 64-bit architecture, very
large buffer pools can be allocated that would allow MySQL to
take advantage of the available memory and manage large
tables in memory, thus eliminating disk access. Accessing
tables in memory is much faster, thereby allowing the database
to work a lot faster.
To put things into perspective, on an average computer it takes
the CPU approximately 200 ns (nanoseconds) to access RAM,
compared to 12,000,000 ns to access the hard drive. A task
that would take 3.5 minutes accessing the RAM would take 4.5
months to complete if it had to access the hard drive!
3. Resistance to Corruption
InnoDB is much more resistant to corruption.

Why Use the InnoDB Engine?ƒ 3


InnoDB Engine

MyISAM needs to access (open and close) tables for almost


every query that it executes. Hence, at any given point a large
number of tables may be open. The database service stopping
abruptly (such as power shutdown) may result in all these open
tables getting corrupted.
As we have seen earlier, InnoDB loads table in the buffer pool
and all future access to the same table occurs in memory. Any
changes (inserts and updates) to the database occur in memory
and the changes are written to a file called the transaction log.
These logs are executed at certain checkpoints (decided by the
engine). Hence, unlike InnoDB, the tables on disk are not open
all the time.
This reduces the chances of corruption for InnoDB tables.
Conclusion
As you can see, InnoDB adds increased value to the database
server. It provides better performance and stability, resulting in an
improved experience and customer satisfaction.

Why Use the InnoDB Engine?ƒ 4


InnoDB Engine

Why Move to 64-Bit?


Improved RAM Access
1. 64-bit hardware architecture brings in an ability to address
memory amounts over 4 GB, up to 16 exabytes. As a result
the database servers can be allocated large buffer pools (32GB,
64GB etc), allowing the entire database to be in memory,
improving the performance of the database server.
2. App server (Tomcat) can make use of more memory, allowing
it to run more threads and manage a larger load.
3. Allowing for the addressing of more of RAM, 64-bit processing
improves application performance.
In order to take advantage of 64-bit software, the underlying
hardware as well as the operating system (Windows / Linux)
must be 64-bit.

Why a Physical Database Server?


Virtualization is a great upcoming technology.
Some Pros of Virtualization are:
ƒ Server Consolidation – Multiple physical servers that are
under-utilized can be combined into a single virtual server.
ƒ Higher Utilization – Many servers implemented in
organizations today are under-utilized. In some cases, servers
are using as little as 15 percent of their processing power.
Virtualization technology enables IT departments to better
utilize existing servers.
ƒ Power Savings - By implementing Virtualization in your
organization, you can reduce the power and cooling
requirements in your data center.
ƒ Testing Environment - Training centers benefit from
Virtualization because deploying virtual machines is as simple
as copying files to multiple physical machines.
ƒ Legacy Applications – Older legacy applications benefit from
Virtualization because an IT department does not have to run
outdated and unsupported hardware.
Some Cons of Virtualization are:
ƒ Performance Hit – When using CPU-intensive applications
that need heavy context switching, Virtualization has an

Why Move to 64-Bit?ƒ 5


InnoDB Engine

overhead that results in performance degradation. Hence, it is


poor for database deployments.

Some good uses of using virtual servers:


9 Terminal Services (with average usage)
9 FTP Servers
9 Domain Name Server
9 DHCP Server

Some areas where Virtualization is not a good idea:


9 Servers with unique/very high resource requirements
9 Servers with unusual peripheral attachments
9 Database servers
9 E-mail Servers

Database Servers
Look at the number of concurrent users your system will need to
support and the kind of physical hardware specs you would need to
run it as a physical machine.
If the database runs fine on a basic 1- or 2-processor server with a
modest amount of RAM (under 8GB), and disk throughput isn't
excessive, Virtualization may be a good idea.
If it requires a multi-processor quad-core machine with 32GB of
RAM and a local 6-disk SAS drive stripe, it is not a good candidate
for virtualization. A physical server is a better choice in this
situation.

Why a Physical Database Server?ƒ 6


InnoDB Engine

NOTICES
Trademarks
eClinicalWorks™
eClinicalWorks is a trademark of eClinicalWorks, LLC. All other
trademarks or service marks contained herein are the property of
their respective owners.

Trademarksƒ 7

Potrebbero piacerti anche