﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Chance commented on RavenDB performance optimizations</title><description>Ah! I can't believe I missed the email alert for your comment Ayende. That's awesome man, thanks!
  
  
By the way, its still on your Todo list. If you've finished that, I can only imagine what else you've knocked off of that list. You guys are rocking hard on Raven - keep it up!
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment15</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment15</guid><pubDate>Fri, 17 Sep 2010 14:10:59 GMT</pubDate></item><item><title>Ayende Rahien commented on RavenDB performance optimizations</title><description>Chance,
  
RavenDB already support spatial queries. I need to document it, though
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment14</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment14</guid><pubDate>Fri, 10 Sep 2010 22:17:57 GMT</pubDate></item><item><title>Chance commented on RavenDB performance optimizations</title><description>Nice! I'd love to have accidents like this! 
  
  
Side question:
  
Any idea when you guys are going to implement geocoding support at the core of Raven? I thought about hacking it in myself, but at the rate of change right now I figured that would be a bad idea. Alternatively, I could perform the algos outside in our logic but I'd rather they be native. (Map/Reduce seems like our best bet atm).
  
  
Thanks,
  
Chance
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment13</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment13</guid><pubDate>Fri, 10 Sep 2010 17:05:45 GMT</pubDate></item><item><title>Demis Bellot commented on RavenDB performance optimizations</title><description>Okay new benchmarks are in - details in my blog under the heading: Benchmarks – Take 2
  
[http://www.servicestack.net/mythz_blog/?p=474](http://www.servicestack.net/mythz_blog/?p=474)  
  
As any additional overhead is multiplied when the 'fsync' option is on, I removed some of these overheads imposed on the Redis Client i.e. active entity id tracking and batching (as its not required for Redis) before enabling the appendonly transaction log with ‘fsync always’ option. 
  
Note: I’m using Redis's batch-ful MSET operation behind the scenes, so the fsync penalty is only paid once.
  
  
The new benchmarks show Redis is now *11.75x* faster than RavenDB with this configuration.
  
  
If you disable the append only transaction log Redis becomes *16.9x* faster than RavenDB.
  
  
Not saying performance is the most important metric just wanted to show that Redis provides a high-performance NoSQL solution for .NET clients. Multiple choices benefit everyone.
  
  
- Demis
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment12</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment12</guid><pubDate>Fri, 10 Sep 2010 01:15:03 GMT</pubDate></item><item><title>Demis Bellot commented on RavenDB performance optimizations</title><description>The benchmarks are both using the standard configuration for both servers, so no. 
  
  
I will re-run the benchmarks with the bug fix and configure it to write on every operation when I get home tonight.
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment11</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment11</guid><pubDate>Thu, 09 Sep 2010 11:13:01 GMT</pubDate></item><item><title>Ayende Rahien commented on RavenDB performance optimizations</title><description>Demis,
  
_Did_ you configure your Redis server to write to disk on every operation (to match more closely what RavenDB is doing)?
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment10</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment10</guid><pubDate>Thu, 09 Sep 2010 11:09:19 GMT</pubDate></item><item><title>Demis Bellot commented on RavenDB performance optimizations</title><description>Ok so there seems to be some confusion how Redis works, so I'll just copy a paragraph from my blog explaining it in more detail:
  
[http://www.servicestack.net/mythz_blog/?p=474](http://www.servicestack.net/mythz_blog/?p=474)  
  
Why is Redis so fast?
  
Based on the comments below there appears to be some confusion as to what Redis is and how it works. Redis is high-performance a data structures server written in C that operates predominantly in-memory and routinely persists to disk and maintains an Append-only transaction log file for integrity – both of which are configurable and can be made to write to disk on every operation. 
  
  
For redundancy it includes built-in replication where you can turn any redis instance into a slave of another, which can be configured at runtime. It also features its own Virtual Machine implementation so if your dataset exceeds your available memory, un-frequented values are swapped out to disk whilst the hot values remain in memory. 
  
  
Like other high-performance network servers e.g. Nginx, Node.js, etc it achieves maximum efficiency by having each Redis instance is a single process where all IO is asynchronous and no time is wasted context-switching between threads. 
  
  
It achieves concurrency is by being really fast and achieves integrity by having all operations atomic. You are not just limited to the available transactions either as you can compose any combination of Redis commands together and process them atomically in a single transaction.
  
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment9</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment9</guid><pubDate>Thu, 09 Sep 2010 11:05:41 GMT</pubDate></item><item><title>Ayende Rahien commented on RavenDB performance optimizations</title><description>Demis,
  
Just to point out, Redis writes to memory, RavenDB writes to disk
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment8</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment8</guid><pubDate>Thu, 09 Sep 2010 10:53:01 GMT</pubDate></item><item><title>Ayende Rahien commented on RavenDB performance optimizations</title><description>Simon,
  
That is a bug, it should be batchSize % 128 == 0
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment7</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment7</guid><pubDate>Thu, 09 Sep 2010 10:52:11 GMT</pubDate></item><item><title>Ryan Heath commented on RavenDB performance optimizations</title><description>Dennis, you seem to have copyed over the bug Simon Labrecque is talking about.
  
Does it make any difference when you reset the batch counter when 128 is reached?
  
  
// Ryan
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment6</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment6</guid><pubDate>Thu, 09 Sep 2010 10:14:32 GMT</pubDate></item><item><title>Demis Bellot commented on RavenDB performance optimizations</title><description>For anyone interested I have modified benchmarks to include timings for Redis as well. I've kept it as close as possible to the RavenDB example including the 128 batch size which Redis doesn't need.
  
  
Basically the results shows that Redis stores all 5,163 documents in 981ms making it *2.85x* quicker than RavenDB in this scenario.
  
  
I have more information available on my blog post here:
  
[http://www.servicestack.net/mythz_blog/?p=474](http://www.servicestack.net/mythz_blog/?p=474)  
  
Although Redis and RavenDB are not exactly the same type of NoSQL data store  (RavenDB is a document database while Redis is a data structures server) they still have some overlapping use cases.
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment5</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment5</guid><pubDate>Wed, 08 Sep 2010 22:59:32 GMT</pubDate></item><item><title>Agarwal / Simon Labrecque commented on RavenDB performance optimizations</title><description>[This assumes the code at 
[github.com/.../Program.cs](http://github.com/ravendb/ravendb/blob/master/Raven.Performance/Program.cs) is the code that has been run for those benchmarks]
  
  
Ayende, any reason you're calling SaveChanges once when batch == 128, then wait until after the 5,163th object has been processed to call SaveChanges again? Eg, you are not resetting batch to 0 in the if (
[github.com/.../Program.cs#L560](http://github.com/ravendb/ravendb/blob/master/Raven.Performance/Program.cs#L560)).
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment4</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment4</guid><pubDate>Wed, 08 Sep 2010 22:03:02 GMT</pubDate></item><item><title>josh commented on RavenDB performance optimizations</title><description>Cool. I'm probably using a version before this was added and it was already fast. Faster than SQL and MongoDB in my simplistic tests. ..and I mean a LOT!! faster than both.
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment3</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment3</guid><pubDate>Wed, 08 Sep 2010 16:53:36 GMT</pubDate></item><item><title>Louis Hau&amp;#223;knecht commented on RavenDB performance optimizations</title><description>According to 
[github.com/.../Program.cs](http://github.com/ravendb/ravendb/blob/master/Raven.Performance/Program.cs) he's using relative small User-objects (Id, Email, Name).
  
  
Anyway, nice tweak!
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment2</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment2</guid><pubDate>Wed, 08 Sep 2010 13:25:54 GMT</pubDate></item><item><title>Demis Bellot commented on RavenDB performance optimizations</title><description>Pretty good results ayende, should satisfy a lot of use-cases.
  
  
What type of documents are you using in these benchmarks?
</description><link>http://ayende.com/4622/ravendb-performance-optimizations#comment1</link><guid>http://ayende.com/4622/ravendb-performance-optimizations#comment1</guid><pubDate>Wed, 08 Sep 2010 11:39:29 GMT</pubDate></item></channel></rss>