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 609103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:31:48+00:00 2026-05-13T17:31:48+00:00

I couldn’t find a good title for the question, this is what I’m trying

  • 0

I couldn’t find a good title for the question, this is what I’m trying to do:

  • This is .NET application.
  • I need to store up to 200000 objects (between 3KB-500KB)
  • I need to store about 10 of them per second from multiple-threads
  • I use binaryserialization before storing it
  • I need to access them later on by an integer, unique id

What’s the best way to do this?

  • I can’t keep them on memory as I’ll get outofmemory exceptions
  • When I store them in the disk as separate files what are the possible performance issues? Would it decrease the overall performance much?
  • Shall I implement some sort of caching, for example combine 100 objects and write it once as one file. Then parse them later on. Or something similar?
  • Shall use a database? (access time is not important, there won’t be search and I’ll access only couple of times by the known unique id). In theory I don’t need a database, I don’t want to complicate this.

UPDATE:

  • I assume database would be slower than file system, prove me wrong if you got something about that. So that’s why I’m also leaning towards to file system. But what I’m truly worried is about writing 200KB*10 per second to HDD (this can be any HDD, I don’t control hardware, it’s a desktop tool which will be deployed in different systems).
  • If I use file system I’ll store files in separate folders to avoid file-system related issues (so you can ignore that limitation)
  • 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-05-13T17:31:48+00:00Added an answer on May 13, 2026 at 5:31 pm

    If you want to avoid using a database, you can store them as files on disk (to keep things simple). But you need to be aware of filesystem considerations when maintaining a large number of files in a single directory.

    A lot of common filesystems maintain their files per directory in some kind of sequential list (e.g., simply storing file pointers or inodes one after the other, or in linked lists.) This makes opening files that are located in the bottom of the list really slow.

    A good solution is to limit your directory to a small number of nodes (say n = 1000), and create a tree of files under the directory.

    So instead of storing files as:

    /dir/file1 /dir/file2 /dir/file3 … /dir/fileN

    Store them as:

    /dir/r1/s2/file1 /dir/r1/s2/file2 … /dir/rM/sN/fileP

    By splitting up your files this way, you improve access time significantly across most file systems.

    (Note that there are some new filesystems that represent nodes in trees or other forms of indexing. This technique will work as well on those too.)

    Other considerations are tuning your filesystem (block sizes, partitioning etc.) and your buffer cache such that you get good locality of data. Depending on your OS and filesystem, there are many ways to do this – you’ll probably need to look them up.

    Alternatively, if this doesn’t cut it, you can use some kind of embedded database like SQLlite or Firebird.

    HTH.

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

Sidebar

Related Questions

No related questions found

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.