the shifting storage spectrum - tbray.org · application code o/r mapping sql engine os and...
TRANSCRIPT
The Shifting Storage Spectrum
Tim BrayWeb GuySun Microsystems
The Shifting Storage Spectrum
Tim BrayWeb GuySun Microsystems
“Memory is the new disk; Disk is the new tape.”
The Storage HierarchyRegisters
L* Cache
DRAM
SSD
Disk
Tape
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Bytes
Normalized tuples
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Distributed hash table
Key/Value pairs
www.danga.com/memcached/For example:
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Application code
SQL engine
OS and Filesystem
Caches and disks
SQL
Normalized tuples
Bytes
wikipedia.orgFor example:
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Application code
OS and Filesystem
Caches and disks
XML, JSON, plain text, media files, ...
Bytes
tbray.org/ongoing/For example:
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Object store
Application code
OS and Filesystem
Caches and disks
Objects
Serialized objects
Bytes
ruby.gemstone.comFor example:
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Minimal SQL
engine
Application code
O/R mapping
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
krow.livejournal.com/622006.htmlFor example:
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Column-oriented DBMS
Application code
O/R mapping
OS and Filesystem
Caches and disks
Objects
SQL-like queries
Bytes
Normalized tuples
appengine.google.comFor example:
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Document-oriented DBMS
Application code
OS and Filesystem
Caches and disks
Name-value pairs and blobs
Bytes
XML, JSON, plain text, media files, ...
For example: incubator.apache.org/couchdb/
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Web space via HTTP
Application code XML, JSON, plain text, media files, ...
• WebDAV (filesystem metaphor) • AtomPub (REST)
Clients Procs PostsSecondsElapsed %Idle
Postsper sec
1 10 1000 ~10.8 85 ~90
2 20 2000 ~12.5 72 ~160
3 30 3000 ~13.5 53 ~220
4 40 4000 ~14.2 46 ~280
5 50 5000 ~15.4 56 ~320
For example: tbray.org/ongoing/When/200x/2008/11/02/How-Fast-is-Fast
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes?!
The Storage HierarchyRegisters
L* Cache
DRAM
SSD
Disk
Tape
The Storage HierarchyTypicalLatency
TypicalThroughput
Registers < 1 nsec n/a
L* Cache < 10 nsec > 100 G/sec
DRAM < 500 nsec > 1 G/sec
Dist. hash table < 50 µsec n/a
SSD/Disk ? ?
Tape < 60 sec > 100 M/sec
What Bonnie Believes• Applications need to read & write files.• Sometimes they use smart block I/O, sometimes
they process characters and rely on buffering libraries.
• Sometimes they need to update files in place.• Sometimes they need to seek around.• The OS filesystem RAM cache always eventually
runs out and you have to do real disk I/O.
-------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- GB M/sec %CPU M/sec %CPU M/sec %CPU M/sec %CPU M/sec %CPU /sec %CPUPro 12 64.7 82.0 67.4 10.0 29.8 5.0 64.8 76.7 67.9 6.5 190 0.7
Some Bonnie Output
-------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- GB M/sec %CPU M/sec %CPU M/sec %CPU M/sec %CPU M/sec %CPU /sec %CPUPro 12 64.7 82.0 67.4 10.0 29.8 5.0 64.8 76.7 67.9 6.5 190 0.7T2K 100 20.5 100 150.1 100 61.4 64.8 19.8 98.9 148.9 76.7 214 10.7
Some Bonnie Output
-------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- GB M/sec %CPU M/sec %CPU M/sec %CPU M/sec %CPU M/sec %CPU /sec %CPUPro 12 64.7 82.0 67.4 10.0 29.8 5.0 64.8 76.7 67.9 6.5 190 0.7T2K 100 20.5 100 150.1 100 61.4 64.8 19.8 98.9 148.9 76.7 214 10.77410 16 125.9 98.6 260.5 56.5 90.3 28.9 106.1 98.6 237.2 38.4 1058 93.1
Some Bonnie Output
-------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- GB M/sec %CPU M/sec %CPU M/sec %CPU M/sec %CPU M/sec %CPU /sec %CPUPro 12 64.7 82.0 67.4 10.0 29.8 5.0 64.8 76.7 67.9 6.5 190 0.7T2K 100 20.5 100 150.1 100 61.4 64.8 19.8 98.9 148.9 76.7 214 10.77410 16 125.9 98.6 260.5 56.5 90.3 28.9 106.1 98.6 237.2 38.4 1058 93.1SSD 8 44.8 66.4 69.3 12.8 51.5 10.7 73.4 94.3 246.0 27.0 7856 43.2
Some Bonnie Output
The Storage HierarchyTypicalLatency
TypicalThroughput
Registers < 1 nsec n/a
L* Cache < 10 nsec > 100 G/sec
DRAM < 500 nsec > 1 G/sec
Dist. hash table < 50 µsec n/a
SSD < 200 µsec > 100 M/sec
Disk < 10 msec > 100 M/sec
Tape < 60 sec > 100 M/sec
“Memory is the new disk; Disk is the new tape.”
“Memory is the new disk; Disk is
the new tape.Unless it’s SSD.”
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Application code
O/R mapping
SQL engine
OS and Filesystem
Caches and disks
Objects
SQL
Normalized tuples
Bytes
Thank You!Slides at:tbray.org/tmp/QCSF08.pdf
[email protected]/ongoing