photo frame digital photo frame

Download Report

Transcript photo frame digital photo frame

From Disk to Memory
It’s 2016 Folks!
Phani Yenugu
https://www.linkedin.com/in/pyenugu
[email protected]
About Me!
Senior Enterprise Architect
• 23+ years in IT.
• Worked with most of the OS/Server/Storage/Hardware
technologies released since 1993.
• First Oracle version 6.4 in 1995.
• Exadata last 3+ years.
• TOGAF 9 Enterprise Architect.
• Certified Oracle 8i/9i/10g/11g DBA.
• Certified Solaris System Admin.
• Certified HP-UX System Admin.
Hobbies: Building/Breaking/Building(and learn), Robots,
Rubik’s
Built digital Photo Frames before any major player in the
market.
Disclaimer!
• The opinions expressed on the following slides are
solely mine.
• Some comments/views may be dated due to version
differences etc. Please contact vendor and their
documentation.
• Stunts performed by professional (me or my team) in
closed course (sandbox) and real track (Production).
• You can try in your closed course too!
• Just be aware and understand thoroughly before you
run/try/implement in your real track!
Why move to Memory?
•
Data Growth (More data means more
ideas for business)
•
Business Complexity (More channels,
integrations etc.)
•
Business is becoming more competitive.
Users have no patience. So, time to
Market is critical
•
Current data retrieval methods are
dated!
•
Memory is cheap!
Oracle Architecture - SGA
Shared Pool
Java Pool
Buffer Cache
Large Pool
Log Buffer
Streams Pool
Life of a SQL Statement
SQL
Select ……..
From ……
Where …..
Group by …..
Order by …..
1
User
Parse
2
Execute and
Fetch (Buffer Cache)
Syntax Check
Semantic Check
Dictionary
5
4
Shared Pool (Memory) Check
3
Shared Pool
Optimizer
Library Cache
Shared SQL Area
Code Generator
6
Life of a SQL Statement
SQL
Select ……..
From ……
Where …..
Group by …..
Order by …..
1
User
Parse
2
Execute and
Fetch (Buffer Cache)
Syntax Check
Semantic Check
Dictionary
5
4
Shared Pool (Memory) Check
3
Shared Pool
Optimizer
Library Cache
Shared SQL Area
Code Generator
7
Oracle Architecture – Buffer Cache
Dirty List
Pinned
Buffers
Dirty
Buffers
LRU List
Free
Buffers
I/O Types:
Cached
Direct
I/O Layers
Cached I/O
USER Layer
VFS Layer
FS CACHE
LVM Layer
SCSI/Fiber Layer
Multi path Software etc.
HDD Layer (SAN)
Direct I/O
(ASM)
SAN Setup
Inside a SAN Frame
FS
1
4
2
5
3
6
RAID 0
Blocks Striped
DISK 1
DISK 2
1
4
2
5
3
6
FS
1
2
RAID 1
3
Blocks Mirrored
DISK 1
DISK 2
1
1
2
2
3
3
FS
1
4
2
5
3
6
RAID 5
Blocks Striped
and Mirrored
DISK 1
DISK 2
DISK 3
1
2
P
3
P
4
P
5
6
RAID 5 is Good…..or is it?
RAID 5
Great for Reads
But, double penalty for writes
Risk of data loss if there are 2
bad blocks in 2 drives.
FS
1
4
2
5
3
6
RAID 10
Blocks Mirrored
and Striped
DISK 1
DISK 2
DISK 3
DISK 4
1
1
2
2
3
3
4
4
5
5
6
6
What is a block?
Block sizes
Linux (64bit) – 4k
Oracle – 8k (standard)
Data is retrieved in blocks. It may
contain one or more rows
Entire row (or rows) is sent back
to buffer cache
Oracle Architecture – Buffer Cache
Dirty List
Pinned
Buffers
Dirty
Buffers
LRU List
Free
Buffers
In-Memory
In-Memory builds columnar
structure. Possible to specify only
the columns that are of interest
If there are DML changes they
are reflected in In-Memory
No logging, so little overhead
Quick scale-up and scale-out
* Not persistent. DB recycle will
lose the in-memory data.
In-Memory pools
• IMCU - In Memory Compression Unit
• SMU - Snapshot Metadata Unit
In-Memory views
• v$im_segments
• # objects that are in memory
• v$inmemory_area
• Allocation of IMCUs and SMUs
(80/20)
• v$im_header
• # of rows in each IMCU
How to enable
Run im_advisor
Add memory to SGA
Configure inmemory_size (min.
100MB)
Place tables in Memory
(alter table <table_name>
inmemory;) <options>
Recap
• Easy to implement. No
application changes
• Low overhead
• Easy scale-up and scale-out
• Best ROI
• Fast & Efficient
• Business value
I don’t have license(…neither budget)
Cannot be as effective but….
• Get more memory (it’s cheap)
• Pin objects (db_cache_keep_size)
• Tune queries better (of course)
• Full Database Caching (12c)
(alter database force full database caching;)
and one more….
Do you know?
Redolog and Control file
Block Size in Oracle
has always been 512 bytes.
Even in 12c!
Check for yourself 
SYS> select distinct blocksize from v$log;
BLOCKSIZE
---------512
Controlfile logblock size
SYS> select max(lebsz) from sys.x$kccle;
MAX(LEBSZ)
---------512
If you notice
Controlfile Enqueue or
Logfile Sync
waits in your database
Make sure
• FS is NOT RAID 5
• SAN Cache is NOT FULL
• Move to Direct I/O (ASM)
• Move to a FS with 512 Blocksize
THANK YOU!