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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:24:10+00:00 2026-05-27T18:24:10+00:00

This questions seems easy, but I am not able to understand the real work

  • 0

This questions seems easy, but I am not able to understand the real work behind it.
I know people will say, break down into 512 Megs chunks and sort them like using Merge Sort using Map reduce.

So here is the actual question i have:

Suppose i break the file into 512 Megs chunk and then send to different host machines to sort them.
suppose these machines used the Merge Sort.
Now say, i had 2000 machines each sorted 2000, 512 megs of chunk. Now when i merge them back, how does that work? Won’t the size keep on increasing again? For example merging two 512 megs will make 1024Megs which is size of my RAM so how would this work? Any machine can’t merge a chunk of more than 512 megs chunk with another chunk because then size > 1 GB.

How at the end of merging will i ever be able to merge two 0.5 TB chunk with another 0.5 TB chunk.. Does the concept of Virtual Memory come into play here?

I am here to clarify my basics and i hope i am asking this very important question (correctly) correctly. Also, who should do this merge(after sorting)? My machine or few of those 2000 machines?

  • 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-27T18:24:11+00:00Added an answer on May 27, 2026 at 6:24 pm

    Here’s a theoretical way which should work. Say you’ve got your 2000 512mb files, ready to create one 1TB file.

    If you simply loop through every file, find which one has the lowest FIRST value, then move that into your destination file, and repeat then you’ll end up with everything in order. RAM usage should be tiny as you’ll never need to open more than one line at a time.

    Obviously you should be able to optimize this – keep the first line of every file in RAM as you go and it should be somewhat faster.

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

Sidebar

Related Questions

This seems to be an easy question to ask, but I am not able
Seems that This will be an easy question for you but this problem is
This may seem an easy question, but not to me, also a search has
So this should be a real easy question but I can't seem to find
There are many questions like this but I can't find one that seems to
I've seen a bunch of similar questions to this, but nothing seems to be
I know this is probably an easy question but after reviewing the documentation for
This might seem an easy question for some, but I am struggling with it.
This is an easy question, but I cannot seem to solve it. My html
This might seem like a very easy question for some of you folks, but

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.