2 <!DOCTYPE HTML PUBLIC 
"-//W3C//DTD HTML 4.01//EN"> 
   5         <link type=
"text/css" rel=
"stylesheet" href=
"style.css" /> 
  12             <img style=
"border:none" alt=
"Redis Documentation" src=
"redis.png"> 
  16             <div id=
"pagecontent"> 
  18 <!-- This is a (PRE) block.  Make sure it's left aligned or your toc title will be off. --> 
  19 <b>Speed: Contents
</b><br>  <a href=
"#Speed (ROUGH DRAFT)">Speed (ROUGH DRAFT)
</a><br>    <a href=
"#TODO">TODO
</a> 
  22                 <h1 class=
"wikiname">Speed
</h1> 
  30 <h1><a name=
"Speed (ROUGH DRAFT)">Speed (ROUGH DRAFT)
</a></h1><h2><a name=
"TODO">TODO
</a></h2><ul><li> Written in ANSI C
</li><li> Pipelining
</li><li> MultiBulkCommands
</li><li> epoll 
>= 
1.1</li><li> Benchmarks
</li></ul> 
  31 Redis takes the whole dataset in memory and 
<a href=
"Persistence.html">writes asynchronously to disk
</a> in order to be very fast, you have the best of both worlds: hyper-speed and 
<a href=
"Persistence.html">persistence
</a> for your data.
<br/><br/>Establishing a new connection to a Redis Server is 
<i>simple
</i> and 
<i>fast
</i> nothing more that a TCP three way handshake. There is no authentication or other handshake involved (
<a href=
"http://groups.google.com/group/redis-db/browse_thread/thread/1adb93f0b6a1460a" target=
"_blank">Google Group: Can we use connection pool in Redis?
</a>) You can read more about the way Redis clients communicate with servers in the 
<a href=
"ProtocolSpecification.html">Protocol Specification
</a>.
<br/><br/>On most commodity hardware it takes about 
45 seconds to restore a 
2 GB database, without fancy RAID. This can give you some kind of feeling about the order of magnitude of the time needed to load data when you restart the server, so restarting a server is fast too.
<br/><br/>Also 
<a href=
"Replication.html">Replication
</a> is fast, benchamarks will give you the the same order of magnitude a restart does (
<a href=
"http://groups.google.com/group/redis-db/browse_thread/thread/3ab1c8b2126f1b8/29bdb6c5973f0388?lnk=gst&q=replication+#29bdb6c5973f0388" target=
"_blank">Google Group: Replication speed benchmak
</a>)