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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:15:19+00:00 2026-06-03T00:15:19+00:00

If I have 4, 8 or more threads & clusters on one box running

  • 0

If I have 4, 8 or more threads & clusters on one box running this code, can there be resource contention over log files / file writers? If so, could you post an example that illustrates? So far all the testing I’ve done seems to indicate that write data won’t get interwoven and won’t get thrown away, but I am not 100% convinced

Thanks!

var errLog = fs.createWriteStream(... + '/error.log');
GLOBAL.dbLog = fs.createWriteStream(... + '/db.log');
  • 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-03T00:15:21+00:00Added an answer on June 3, 2026 at 12:15 am

    There is no coordinating of threads or clustered processes, so the question comes down to whether the OS will allow multiple open write streams to a file. The default C flags for CreateWriteStream are O_WRONLY || O_CREAT || O_TRUNC. This indicates a first problem – all processes will be creating a new truncated file (when probably you wanted appending).

    So assuming you’re specifying w+ as a flag when creating the stream…

    For Linux, this related question indicates that you will be ok as long as number of bytes is less than PIPE_BUF bytes (4096 on Linux, 512 on some other Unixes).

    I’m not sure what the answer is on Windows.

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

Sidebar

Related Questions

Can threads have more than one argument without using a struct? So... kind of
How can one have more than a Wizard control on the same page without
I have manualy writing class for WinSock. My program have more that one threads.
I have more than one Event Listener that calls a specific function, and I
Where I have more than one table in my database for use with (similar,
I have a multithreaded application running on Win XP. At a certain stage one
In my java application I have many threads, but there are several most important
If I have two threads (Linux, NPTL), and I have one thread that is
I have a simple message schema where a thread ties 2 or more users
I have a simple message schema where a thread ties 2 or more users

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.