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

  • Home
  • SEARCH
  • 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 134031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:32:23+00:00 2026-05-11T06:32:23+00:00

I am doing some long simulations that can take from several hours to several

  • 0

I am doing some long simulations that can take from several hours to several days and I am logging the information into files. The files can reach sizes of hundreds of Mb and inside there is just a list of numbers. I am really concern about the overhead that this is originating. I would like to ask if the overhead of using this method is really big and if there is any other more efficient method to do the same, just log information.

I am using C++ and to log the files I just use the common methods of fprintf. To explain the overhead if you can give a practical example similar to, using files it takes this time without using them this time, that will be ideally.

I did some test but I have no idea if the overhead grows lineally with the size of the files. What I am saying is that maybe is not the same add a line to a file of a size of 1Mb than a file of size of 1Gb. Does anyone know how the overhead grow with the size of the file?.

  • 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. 2026-05-11T06:32:24+00:00Added an answer on May 11, 2026 at 6:32 am

    You just need some back-of-the-envelope calculations, I think.

    Let ‘hundreds of Mb’ be 400MB.
    Let ‘several hours to several days’ be 48 hours.

    (400 * 1024 * 1024 bytes) / (3600 * 48 seconds) = 2427 bytes/sec

    Obviously, you can just watch your system or use real numbers for the calculation, but using the rough estimate above you’re logging about 2KB/sec, which is pretty trivial compared to the average hard-drive limits.

    So, no, the overhead doesn’t appear to be very big. And yes, there’s more efficient ways to do it, but you would probably spend more time and effort that it’s worth for the miniscule savings you get unless your numbers are very different from what you stated.

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

Sidebar

Related Questions

Currently I'm doing some unit tests which are executed from bash. Unit tests are
I've been doing some mocking with RhinoMocks and it requires that mocked methods be
I'm doing some Objective-C programming that involves parsing an NSXmlDocument and populating an objects
I'm doing some research into databases and I'm looking at some limitations of relational
I was doing some rounding calculations and happened upon a question. How can I
After doing some work with Ruby, Rails, and RSpec last summer and I learned
I'm doing some PHP stuff on an Ubuntu server. The path I'm working in
I'm doing some funky authentication work (and yes, I know, open-id is awesome, but
I've been doing some HTML scraping in PHP using regular expressions. This works, but
I am doing some research on Unicode for a white-paper I am writing. Does

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.