Professional Documents
Culture Documents
What is Exadata ?
1. A bundle of Hardware and Software from Oracle Itself and ready to use immediately.
2. An Intelligent Storage Server to optimize Database Performance. In order to achieve this intelligent a
software called Exadata is installed on all storage servers.
In Exadata Terms, A single storage server is called Cell or Cell server. So I will be referring storage server
and cell server interchangeably in this article. I might be referring DB Server, DB Node for Database
Server.
In above diagram, there are three DB nodes, which are connect with two cell servers. Each storage
server has it components.
Cell Service (CellSRV): This is the primary component of Exdata Cell which provides
all Exadata Storage services. This process communicate with Database server for providing
databaseblocks.
service
provide
an interface
to
DBA for
communicating or Managing Cell Server. CellCLI is the Command Line tool which Exadata DBA used for
performingExadata Administration services.
Restart Server (RS): This service is to make sure the functioning of Exadata Server. RS
monitors CellSRV and MS for liveliness and restart them whenever required.
is used for
reducing storage consumption for large databases. In this technique a logical unit called Compression
unit is used to store Hybrid columnar Compressed Rows. At time of data loading Column values are
detached from rows, grouped and then compressed. After compression this is fit into compression unit.
Database Smart scan processing is also supported at cell level i.e. Data blocks need not to movefrom cell
server to database server for processing. The amount of saving storage space using HCC is around 10 to
15 times. Suppose you have 100 Tera Bytes of data, by using HCC DBA can storethis Data in to 10 TB of
Storage space.
3. Smart Scan Processing: In Exadata storage server has got intelligence to filter
data at storage level, rather than transferring it to database server.
Exadata Smart Scan works filtering for following kind of queries:
1. Predicate Filter: In a query with where clause only blocks with satisfy where clause condition will only
go to database server not the entire table.
2. Column Filtering: Suppose in a select query like "select name, age from employee" is execute on DB
server by DBA, then only columns name and age data will send to Database Server not all columns of
tables.
3. Join Processing: All join processing are done at Storage level itself, so only filtered data is sent to DB
server.
Let's take an example: You have two database Production and testing running on same Cell
Server. Now Database Administrator can configure Resource plan which gives priority to Production
Database over testing DB. Here, Whenever Testing Database load will affect Production Database IORM
will manage rerource request such that it doesn't impact production Database performance. This
means Test Database requests has to wait until they can execute without disturbing production database
performance.
Cache it will go otherwise it will go to Hard Disk. In Conclusion, Exadata Smart Flash Cache is an
intelligent Flash Cache which works according to I/O types.
Following I/O operations are stored in Smart Flash Cache.
1. Frequently Access data and Index blocks.
2. Control files reads and writes.
3. File Header read and writes.
Following I/O operations are not stored in Smart Flash Cache.
1. I/O operations for data block mirror copies.
2. Backup related I/O.
3. Data pump I/O.
4. Full Table scan.
To achieve, This intelligence each I/O is tagged with a metadata about I/O type, Exadata Flash Cache use
this information to make decision about keeping database block into flash cache or not.
For Example: DBA is taking an expdp backup, in traditional storage server with flash cache all
dbblocks are loaded into flash cache and can be a performance bottleneck in the system even we know
that, we are not going to use these blocks in future.
But in Exadata Smart Flash Cache, Exadata Storage Server knows that these data blocks should not go
into flash cache and makes a big difference in database performance. There are two types of Database
operation performed DB read or DB write. So let's see
to
data
into
hard
Database
write.
disk.
Node.
To optimize next read operation in Exadata. Now, next read request for same block will only go to flash
cache and will give a boost in performance by avoiding disk read operation.
2. Database Read Operation: There could be two situations for Database read
operations.
A. Data Block is Cached into Flash Cache: In this case DBA will get fast response, because the block
will be read from flash cache so no hard disk read I/O. Here are the steps:
1. Database sent a read request.
2. Data block is already in Smart Flash Cache.
3.This will supply data block to database node.
This whole process has skip data block reading from hard disk so boost the performance.
B. Data Block is not Cached into Flash Cache: In this case, when Database Administrator issue a
select query to read some data and data is not present in Smart flash cache. Below are the action
sequence:
1. DB request for Data block.
2. CellSRV will read blocks from Hard Disk.
3. CellSRV provide block to database node.
4. CellSRV place a copy of block into Exadata Smart Flash Cache.
Now next time when ever same block request will come from DBA the situation will be like 2A.
Default: This shows Exadata Smart Flash Cache is used normally. DBA can use belowcommand to
set CELL_FLASH_CACHE as DEFAULT.
ALTER TABLE {table_name} STORAGE(CELL_FLASH_CACHE DEFAULT)
Keep: Using CELL_FLASH_CACHE as KEEP means Exadata will try to keep this object more
aggressively in to Flash Cache.
ALTER TABLE {table_name} STORAGE(CELL_FLASH_CACHE KEEP)
None: Setting CELL_FLASH_CACHE as NONE by Remote DBA for an object shows Flash Cache
will not use at all for this object.
One of the big differences between Exadata and Non-Exadata systems is the necessity to administer
the Exadata Storage Server.
The first time you have to configure the Server side, it has to be done through KVM (Keyboard, Video,
Mouse), meaning you will need to be physically near your server. Once the initial configuration steps
have been performed, we shall be able to administer the Exadata Storage Servers over the network
(i.e. SSH protocol or redirect the KVM console to your desktop using the Sun Integrated Lights Out
Management ILOM remote client).
Once you are in the server, some tools will be available to us, including Cell Command Line Interface
(CellCLI).
CellCLI is only available on the Storage Server. If we need to execute it from outside the storage server
(or on more than one storage server), we will need to use the Distributed Command Line Interface
(dcli).
CellCLI will allow us to perform administration task like startup, shut down, monitoring activities as well
as maintenance.
The syntax to follow is:
[admin command / object command] [options];
Being:
1.- Admin Commands: Administration actions like START, QUIT, HELP, SPOOL.
2.- Object Command: Administration action to be performed on the cell objects like ALTER, CREATE,
LIST.
3.- Options: Will allow us to specify additional parameters to the command.
If you prefer to execute the command from command-line, we will have to use -e:
1
2
3
Or
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
----------------------cell_offload_processing
The problem:
We were using DBFS to store our exports. This was the perfect solution as the business could see the
files on the destination folder, but it did not meet our requirements performance wise on our Exadata.
We have decided to mount NFS and performance did improve, but we had a different problem. NFS is
mounted on the database server and business do not have access for security reasons and segregation
of duties.
Since then, the export jobs run, but business could not see what files were created, so the question
was asked.
The solution:
After some research I came across with the following package:
SYS.DBMS_BACKUP_RESTORE.searchFiles
I did have to play a little bit, and I finished with the following script:
1.- Create an Oracle type
1
2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
1
2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
2
3
4
5
6
7
8
9
10
-------------------------------------------------------------------------------------------
problem: Scenario
From time to time, I have to run scripts or single commands on all nodes for Exadata. This can take
some time.
The problem:
We have a request from our developers to flush the shared pool on all nodes on our UAT Exadata. This
is due to a bug we are still experiencing.
The solution:
This is a typical request for my team, were we have to run something on all our nodes. Flushing shared
pool can be one of them.
Connecting and executing the same command 8 times, if you have a full rack, can be time-consuming
and it is, probably, not the most exciting task to do.
For this reason I came up with the following script. It is something to help me with, so please, test it
before using on production.
The sql file to be executed can be anything you would normally run from sqlplus.
------------------------------------------------------------------------------------
#!/bin/ksh
###############################
##
## Script to execute sql commands on all Exadata nodes
##
## Owner: David Alejo-Marcos
##
## usage: Exadata_sql_exec.ksh
## i.e.: Exadata_sql_exec.ksh MYTESTDB flush_shared_pool.sql
##
## Example of test.sql:
##
## oracle@hostname1 (MYTESTDB1)$ cat test.sql
## select sysdate from dual;
## select 'this is my test' from dual;
##
## alter system switch logfile;
##
###############################
NO_OF_ARGS=$#
typeset -u DB_SRC=$1
typeset -l DB_SCRIPT1=$2
typeset -l DB_SCRIPT=$2_tmp
if [[ "$NO_OF_ARGS" = "2" ]]; then
echo "Parameters passed: OK"
else
echo "usage: Exadata_sql_exec.ksh"
echo "i.e.: Exadata_sql_exec.ksh MYTESTDB flush_shared_pool.sql"
exit 1
fi
echo "sqlplus -s '/as sysdba'" >/tmp/${DB_SCRIPT}
echo "set linesize 500" >>/tmp/${DB_SCRIPT}
echo "set serveroutput on" >>/tmp/${DB_SCRIPT}
echo "select host_name, instance_name from v\\\$instance;" >>/tmp/${DB_SCRIPT}
echo "@/tmp/${DB_SCRIPT1}" >>/tmp/${DB_SCRIPT}
echo "exit;" >>/tmp/${DB_SCRIPT}
echo "EOF" >>/tmp/${DB_SCRIPT}
# Copy both scripts to all Exadata DB Servers.
dcli -l oracle -g ~/dbs_group -f /tmp/${DB_SCRIPT} -d /tmp
dcli -l oracle -g ~/dbs_group -f ${DB_SCRIPT1} -d /tmp
# Execute command on all Exadata DB
dcli -l oracle -g ~/dbs_group " (chmod 700 /tmp/${DB_SCRIPT} ; /tmp/$
{DB_SCRIPT} ${DB_SRC} ; rm /tmp/${DB_SCRIPT} ; rm /tmp/${DB_SCRIPT1})"