If you can't read please download the document
Upload
lamkien
View
246
Download
18
Embed Size (px)
Citation preview
Part 1:
2015. 2. 10. [122]
.
.
.
.
2015 February (No.122)
01
SW Webzine
. (Cache)
.1)
,
. ,
.
CPU L1, L2, L3 CPU ,
RAM DISK , web iOS, Android
, , DB ,
.
1.1 CPU
CPU . CPU Main
Bus ,
Register Cache . CPU
. CPU Cache , Main
Memory . Main Memory .
.
1_CPU
: http://lwn.net/Articles/252125/
1) : http://ko.wikipedia.org/wiki/%EC%BA%90%EC%8B%9C
02
CPU
. CPU
.
2_
: http://www.buildagamingpc.org/gaming-cpu/cpu-cache
CPU , ,
. .
,
. ,
. (Caching) ,
. write read
. read write .
.
, redis memcached
.
, DB . L4
.
DB .
2015 February (No.122)
03
SW Webzine
3_ , DB
, DB .
. .
DB . ,
SQL , DB / , DB connection
. DB connection
. DB .
4_
DB SQL (Query) . DB
, DB I/O . DB index , SQL
prepared statement ,
query statement . (transaction)
.
DB SQL Query .
DB connection context switching ,
04
, DB connection connection pool
. DB connection pool DB connection
DB Gateway(DB Broker) DB , ,
.
5_DB DB Gateway
. DB
. ,
Collection . LRU2)
. LRU
. (Object) 3) . 6_ DB
2) LRU(Least Recently Used): 3) .
2015 February (No.122)
05
SW Webzine
,
Collection .
ehcache guava cache .
.
DB
. DB
. DB DB4) . , DB Map Table -
. DB
.
7_ DB
DB (O(1))
. DB , DBA DB
, Map -(key-value)
. Devops ,
, ,
. Redis Memcached
. ( Redis, Memcached Terracotta cache, Jboss cache
, Redis, Memcached .)
/ .
4) DB .
06
8_
9_ Use Case #1
10_ Use Case #2
Use Case.
2015 February (No.122)
07
SW Webzine
.
DB
. DB
. ( 1ms
.)
64GB 10 640GB
. 1(millisecond)
. DB
.
TTL(Time to live, )
. ,
Devops memcached
redis .
.
.
, . ,
. .
3.1
.
. DB
. ,
DB .
08
10_DB
, (, cron
) .
.
11_
Map . .
(, DB)
(Garbage Collection , , TTL, LRU
)
( , )
,
. Java Ehcache .
.
2015 February (No.122)
09
SW Webzine
3.2 DB (Mysql)
,
. DBA ,
.
. DB - -(Map) , SQL . blob List
Map blob .
12_cache statement
create table simple_cache (cache_key varchar(10) not null,cache_value varchar(50),update_time datetime,primary key (cache_key))// create table map_cache (cache_key varchar(10) not null,cache_value blob,update_time datetime,primary key (cache_key))
DB DB Cron
DB SQL DB .
DB .
DB - . DB
,
. DB DB DB - -
. DB DB .
13_ DB DB
10
DB DB/ DB .
cron , DB
DB .
14_ DB
3.3
2.1 ,
Gabage Collection
(Stop the world) .
,
.
. ,
,
.
.
15_
2015 February (No.122)
11
SW Webzine
.
CPU .
CPU .
. DB
. ,
, .
.
,
.
, . Redis Memcached
Part 2 .