Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Dell Precision M4500 laptop with 4GB RAM memory and Ubuntu 12.04 64-bit installed with 8GB of swap memory. After launching usual Java development environment (Eclipse, MySQL Server, SQuirreL, several tabs in Chrome, Skype and Tomcat with relatively small GWT webapp deployed in devmode) about 100 MB of free memory remains (free -m output follows):

             total       used       free     shared    buffers     cached
Mem:          3944       3812        131          0         35        579
-/+ buffers/cache:       3197        746
Swap:         8787        422       8365

Running top ordered by RES memory shows the following:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16509 yura      20   0 2540m 593m  13m S    0 15.1   1:45.25 java
10727 yura      20   0 5290m 441m  20m S    0 11.2  11:16.87 java
15886 yura      20   0 4324m 365m  10m S    0  9.3   2:37.32 java
19666 yura      20   0 3030m 292m  29m S    0  7.4   0:12.25 java
 4363 root      20   0  307m 180m  44m S    5  4.6  72:57.08 Xorg
 4905 yura      20   0  557m 162m  28m S    3  4.1  39:02.73 skype
 2403 mysql     20   0 1531m 151m 3296 S    0  3.8   2:06.37 mysqld
 5717 yura      20   0  974m 133m  26m S    1  3.4  18:14.44 chrome
11957 yura      20   0  978m 106m  14m S    0  2.7   1:04.37 chrome
 5771 yura      20   0  994m  96m  20m S    0  2.5   5:20.52 chrome
18599 yura      30  10  650m  91m  51m S    0  2.3   0:04.78 update-manager
 5980 yura      20   0 1285m  68m 9.9m S    3  1.7  21:16.95 chrome
19600 yura      20   0  919m  58m  21m S    0  1.5   0:02.08 chrome
19608 yura      20   0  914m  54m  21m S    0  1.4   0:12.11 chrome
16546 yura      20   0  916m  53m  20m S    0  1.4   0:34.79 chrome
16654 yura      20   0  930m  50m  21m S    0  1.3   0:01.61 chrome
 4597 yura      20   0 1083m  48m  20m S    2  1.2   6:53.28 unity-2d-shell
 5922 yura      20   0  443m  45m  25m S    0  1.2   1:00.64 chrome
 8501 yura      20   0  631m  42m  16m S    0  1.1   0:08.44 unity-2d-spread
 5820 yura      20   0  909m  34m  12m S    0  0.9   0:02.54 chrome
 5762 yura      20   0  903m  33m  10m S    0  0.9   0:07.36 chrome
 5889 yura      20   0  336m  28m 5124 S    0  0.7   1:56.02 chrome
 4688 yura      20   0  327m  27m 5124 S    0  0.7   8:21.67 gnome-screensav
 4617 yura      20   0  954m  24m 6728 S    0  0.6   0:12.13 nautilus
 4743 yura      20   0  523m  22m 7408 S    1  0.6   6:41.10 unity-panel-ser
 4895 yura      20   0  478m  18m 5300 S    0  0.5   0:03.86 webilder_unity_
 5927 yura      20   0  323m  15m  380 S    0  0.4   0:00.00 chrome
 4596 yura      20   0  634m  15m 9076 S    0  0.4  18:49.60 unity-2d-panel
 4624 yura      20   0  544m  12m 7208 S    1  0.3   0:06.38 python
 5727 yura      20   0  315m  12m 2788 S    0  0.3   0:00.26 chrome
 4575 yura      20   0  905m  12m 6768 S    0  0.3   0:19.45 gnome-settings-
 4613 yura      20   0  493m  10m 6156 S    0  0.3   0:15.71 nm-applet
 5732 yura      20   0  331m  10m  592 S    0  0.3   0:00.26 chrome
 4819 yura      20   0  358m  10m 2328 S    0  0.3   0:00.52 unity-lens-vide
 4876 yura      20   0  540m 9636 4420 S    0  0.2   0:02.83 unity-scope-vid

Now, having 100 MB of free memory is quite fine for me since everything works well.

The problem arises, when I run mvn clean install command which simply start building GWT application: if I leave around 800 MB memory free by closing some Chrome tabs, SQuirreL and GWT webapp running in devmode, mvn clean install runs just fine though consuming almost all of that free 800 MB and then freeing it.

But, if I don't close mentioned apps (Chrome tabs, SQuirrel, leaving GWT app running in devmode) thus having around 100 MB free memory, the whole Ubuntu system just freezes during build process. I tried to wait for several minutes but nothing changes.

Could someone please advise what can cause the whole Ubuntu system to freeze? This can be easily reproduced so I can run any command or check, so any suggestions will be appreciated.

Also, the interesting fact is that every time Ubuntu freezes during the same build step of mvn clean install. But I have no clue why Ubuntu freezes during it since this build step should simply consume more memory and use more CPU.

Thanks in advance!

=================================== EDIT ===================================

Okay, today I found that it actually un-freezes after some time. I left 800 MB free, launched build process, it freezed and, after about 7 minutes un-freezed and build process finished successfully. Still, waiting for 7 minutes is quite unacceptable and I don't quite understand why one process (build process) is blocking other processes (Chrome tabs, mouse movement etc) when there is insufficient memory only for it. Are there any other options besides upgrading to more RAM?

=================================== EDIT #2 ===================================

As per @terdon's suggestion, I measured CPU temperature during normal operation and during build process just before freezing. The results follow:

Normal operation:

Adapter: ISA adapter
Core 0:       +57.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:       +57.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:       +59.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:       +57.0°C  (high = +84.0°C, crit = +100.0°C)

Just before freezing:

Adapter: ISA adapter
Core 0:       +74.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:       +75.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:       +76.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:       +77.0°C  (high = +84.0°C, crit = +100.0°C)

So, it looks to me that it's not due to overheating, since it only goes slightly up, but doesn't even cross high barrier. So, again it looks to me that it's more like memory problem...

share|improve this question
1  
Definitely strange since you have 579M cached as well as 100 free which means that there are 679M of RAM available to the system. In any case, the OOM should kill your process of the machine is freezing. Could this be a heating issue? Does the machine overheat when you are running the mvn command? I have the same laptop and had some heating problems with it. –  terdon Jul 4 '13 at 12:09
    
Hi @terdon, thanks for suggestion - I have Intel Core i7 920XM CPU which is extreme edition and laptop is usually quite warm. I will now measure CPU temperature using sensors during build process and write back. P.S. Please also refer to edited part of question –  Yura Jul 4 '13 at 14:05
    
Hi again, @terdon, please refer to my last edit –  Yura Jul 4 '13 at 14:30
1  
This could be due to swap-thrashing on the disk. Verify that the I/O parameters of the disk (man hdparm) are optimal. Also you can run Maven under nice and ionice so that it has less chances of locking the desktop. Complete unresponsivity smells of interrupt contention/starvation, which I can't quite see if the HD is properly configured... (do you by any chance have NFS mounted devices?). –  lserni Jul 4 '13 at 14:36
    
Nope, no NFS mounted devices are present. Good idea about using nice and ionice - will try that, thanks :) Concerning hdparm - I still have to learn how to use it in order not to mess up my current configuration :) –  Yura Jul 8 '13 at 9:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.