Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7744589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:48:14+00:00 2026-06-01T09:48:14+00:00

I’m working on a prototype, using RavenDB, for my company to evaluate. We will

  • 0

I’m working on a prototype, using RavenDB, for my company to evaluate. We will have many threads inserting thousands of rows every few seconds, and many threads reading at the same time. I’ve done my first simple insert test, and before going much further, I want to make sure I’m using the recommended way of getting the best performance for RavenDB inserts.

I believe there is a bulk insert option. I haven’t investigated that yet, as I’m not sure if that’s necessary. I’m using the .NET API, and my code looks like this at the moment:

Debug.WriteLine("Number of Marker objects: {0}", markerList.Count);

StopwatchLogger.ExecuteAndLogPerformance(() =>
{
  IDocumentSession ravenSession = GetRavenSession();
  markerList.ForEach(marker => ravenSession.Store(marker));
  ravenSession.SaveChanges();
}, "Save Marker data in RavenDB");

The StopwatchLogger simply invokes the action while putting a stopwatch around it:

internal static void ExecuteAndLogPerformance(Action action, string descriptionOfAction)
{
    Stopwatch stopwatch = new Stopwatch();
    stopwatch.Start();

    action();

    stopwatch.Stop();

    Debug.WriteLine("{0} -- Processing time: {1} ms", descriptionOfAction, stopwatch.ElapsedMilliseconds);
}

Here is the output from a few runs. Note, I’m writing to a local instance of RavenDB (build 701). I know performance will be worse over the network, but I’m testing locally first.

One run:
Number of Marker objects: 671
Save Marker data in RavenDB — Processing time: 1308 ms

Another run:
Number of Marker objects: 670
Save Marker data in RavenDB — Processing time: 1266 ms

Another run:
Number of Marker objects: 667
Save Marker data in RavenDB — Processing time: 625 ms

Another run:
Number of Marker objects: 639
Save Marker data in RavenDB — Processing time: 639 ms

Ha. 639 objects in 639 ms. What are the odds of that? Anyway, that’s one insert per millisecond, which would be 1000 every second.

The Marker object/document doesn’t have much to it. Here is an example of one that has already been saved:

{
  "ID": 14740009,
  "SubID": "120403041588",
  "ReadTime": "2012-04-03T13:51:45.0000000",
  "CdsLotOpside": "163325",
  "CdsLotBackside": "163325",
  "CdteLotOpside": "167762",
  "CdteLotBackside": "167762",
  "EquipmentID": "VA_B"
}

Is this expected performance?

Is there a better way (best practice) to insert to gain speed?

Are there insert benchmarks available somewhere that I can target?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:48:16+00:00Added an answer on June 1, 2026 at 9:48 am

    First, I would rather make sure that the number of items you save in a single batch doesn’t get too big. There is no hard limit, however it hurts performance and eventually will crash if the transaction size gets too big. Using a value like 1024 items is safe, but it really depends on the size of your documents.

    1000 documents per seconds is much lower than the number that you can actually reach with a single instance of RavenDB. You should do inserts in parallel and you can do some sort of tweaking with config option. For instance, you could increase the values defined by the settings beginning with Raven/Esent/. It is also a good idea (like in sql server) to put the logs and indexes to different hard drives. Depending on your concrete scenario you may also want to temporarily disable indexing while you’re doing the inserts.

    However, in most cases you don’t want to care about that. If you need really high insert performance you can use multiple sharded instances and theoretically get an unlimited number of inserts/per second (just add more instances).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.