2

enter image description here

This is on a Hyper-V machine. I've set the min RAM to 512 and the max to 2048. The host machine has more then enough RAM.

Does Linux have an issue with Dynamic RAM on Hyper-V? I can't seem to figure out why we are having memory issues.

EDIT: I also just disabled Dynamic RAM and set the min/start up to 2048MB. Still crashed with Memory shortage issues.

EDIT:

[root@localhost ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          1869       1240        629          0         27       1049
-/+ buffers/cache:        162       1706
Swap:          991          6        985

That is during the compile. I will post on the fail. Last time I did it, the system still had a good amount of RAM free on the crash.

PS: I've noticed that if I try and use make -j to use more processors(12), the compile will crash almost instantly.

Here is an example at 4GB Dedicated using the make -j option. The compile crashed right a little after make -j. enter image description here

EDIT3: I was able to compile the kernel finally without using the -j option but why Hyper-V is giving me memory errors like this is weird. Still doing some debugging.

  • Exactly what is the Linux guest you are running? – Michael Hampton Jul 27 '14 at 17:48
  • CentOS 6.5 64bit. – Jason Jul 27 '14 at 17:52
  • But are you using the kernel that came with it? If you used a third party kernel it might not even have support for Hyper-V dynamic memory built in. – Michael Hampton Jul 27 '14 at 17:56
  • How about attaching free -m to your answer? – kubanczyk Jul 27 '14 at 18:01
  • Yes. I am running the default kernel that was installed. Updated question. – Jason Jul 27 '14 at 18:07
2

make -j (with no argument to -j) does not have an upper limit to the number of commands which are started. It parallelizes as much as possible, not just up to the number of cores (as the question sort of suggests).

make -j 12 (or maybe less than 12 depending on how memory hungry each process is) is probably a more sane command in your situation.

From man 1 make:

   -j [jobs], --jobs[=jobs]
        Specifies the number of jobs (commands) to run simultaneously.  If
        there  is  more than one -j option, the last one is effective.  If
        the -j option is given without an argument, make  will  not  limit
        the number of jobs that can run simultaneously.
  • 1
    Thanks! That helps answer half the question. Now if I just knew why it would crash on a compile with no -j option. – Jason Jul 27 '14 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.