1

I have installed Ubuntu 64 bit with windows 8.1 in dual boot mode. My Ubuntu hangs too much and its very slow. Mainly it gives problems with RubyMine, but it is also giving problem with chrome and during hangout.

My computer configuration is low, as follow

  • 2 GB of ram
  • On board intel graphic card
  • Dual core processor.

I have allocated 100 GB of memory for Ubuntu.

Will my problem be solved by migrating to 32 bit Ubuntu,If it so please tell me instruction to do so?

Please suggest any other solutions if possible.

1
  • I have the same behavior – Montells Nov 17 '14 at 16:08
1

Your problems probably mitigates from using the default Ubuntu with Unity. I'd advise to move away from that distro since you have such low specs and move toward Lubuntu or Xubuntu. The problem occurs because you have such low RAM and Unity is a RAM hog. I don't think your problem will be solved if you move to a 32-bit version. You can change this from your current image by using instructions provided on this older post or you can re-install Ubuntu if don't have anything worth saving on that partition.

Here is a page which shows the memory usage of the different Linux Desktop environments.

Just tell me what the "lightest" desktop environment is! OK, for those of you who just want the final answer, with none of the explaination, here it is:

| Desktop Environment | Memory Used |

| Enlightenment 0.18.8 | 83.8 MiB |

| LXDE 0.5.5 | 87.0 MiB |

| XFCE 4.10.2 | 110.0 MiB |

| LXQt 0.7.0 | 113.0 MiB |

| MATE 1.8.1 | 123.0 MiB |

| Cinnamon 2.2.13 | 176.3 MiB |

| GNOME3 3.12.2 | 245.3 MiB |

| KDE 4.13.1 | 302.6 MiB |

| Unity 7.2.0.14 | 312.5 MiB |

10
  • I will try but I prefer to reduce the memory consumed rubymind – Montells Nov 17 '14 at 16:39
  • OP has 4 times the minimum memory required, twice as much as tested machines with "good" performance, and the same amount as tested machine with "excellent" performance - all figures from Ubuntu official web site. Also, here is a listing of requirements. I don't know about RubyMine, though. – Marty Fried Nov 17 '14 at 17:55
  • Also, having 64-bit Ubuntu with 2GB of RAM causes some issues... – Kaz Wolfe Nov 17 '14 at 18:01
  • @Whaaaaaat: I never heard about that - do you have any citations? – Marty Fried Nov 17 '14 at 18:04
  • Just because it says the minimum recommended doesn't mean that it actually works well on the system. Especially since it has such low specs. I tried running Ubuntu 12.04 LTS with unity on my desktop which had 2GB of RAM and it ran slower than crap. If you want a good experience it is better to have a lower memory intensive Desktop Environment – Jacob Bryan Nov 17 '14 at 18:17
1

Installing Lubuntu (http://lubuntu.net/) or Xubuntu (http://xubuntu.org/) instead of Ubuntu will reduce the amount of memory consumed. Neither of them use as much RAM as the Unity desktop which comes w/ "regular" Ubuntu.

If you can install more RAM I would do that, as well.

1
  • 1
    And here is a listing of requirements. Perhaps RubyMine needs more, but Chrome should have enough. – Marty Fried Nov 17 '14 at 17:59
1
+50

The short answer to your question : changing to 32-bit version of Ubuntu should not make any difference in performance, because Ubuntu overall (32 or 64 bit) is perhaps one of the most resource-demanding Linux distros; it's just build that way, but there are methods to improve its performance.

My Experience

I'm also running 64 bit version of Ubuntu 14.04 on a laptop with 6GB of RAM and single-core CPU, and on average I've got 2 GB to 3.3 GB of RAM usage (which I regularly check with htop and free -h commands), and that's with either Cinnamon or Unity desktops, and with various tune-ups on the software side done. Is there anything special I do? Nope; in a typical everyday session I have just couple firefox tabs and terminal open - that's all. On another laptop (2 GB RAM, two-core CPU) I have Linux Mint 17 (Qiana),also 64-bit ; and it also uses up 2 GB of RAM on average, plus swap memory ( which is kind of "borrowed" from hard-drive space, and hard drive isn't that fast). As you may know, Linux Mint is derived from Ubuntu and "under the hood" they're not that different. So you can see that Ubuntu's memory usage is quite large. I'm going to share with you what I've learned so far and what I've done so far to tune the performance.

The Hardware Side of the Issue

The best improvement to any computer and any OS is in the hardware - more RAM, better CPU, and switching to a solid-state drive(ssd) are always good ways to improve performance. You might not realize it, but everything you do on a computer is read-write operation, whether it's in RAM or your drive, and with read/write operations speed solid state drives win a lot. Plus considering that their price is going down now, its a worthwhile investment. I've experimented with a chromebook (which as you may know has 16 GB SSD in the cheapest version). The speed was quite decent, considering that I was using 32 bit version of the OS and on a such crammed-down hard-drive, and nope, that wasn't Ubuntu in crouton, that was an install to the ssd itself.

Well known performance boosters

Many of these are found everywhere online, in fact I've first learned them form howtogeek.com article.

  • Remove unnecessary start-up applications. First , show all hidden applications. To do that type in terminal sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop. Now,type in dash Startup and open Startup Applications app. No printer or scanner ? Get rid of those on startup. No bluetooth ? Get rid of that,too. Chat can be disabled safely. I keep Files disabled,too (I use different file manager anyway). Don't need Onboard (on-screen keyboard) ? Well, you get the idea . . . .
  • Disable services with BootUp-Manager (sudo apt-get install bum). Becareful though - it's a serious tool, not a toy.
  • If you go to Windows only rarely, and want to boot into Ubuntu first thing in the morning, you want to change GRUB_TIMEOUT line in /etc/default/grub file to be GRUB_TIMEOUT=0
  • Change how aggressively Ubuntu sends stuff into swap (borrowed) memory, by changing swappiness value. Simply add vm.swappiness = 5 line to /etc/sysctl.conf file.
  • Try using lighter desktop, like LXDE or XFCE.

Tune the Graphics

The big improvement to your experience with Ubuntu will come from tuning down the graphic effects. Many people suggest switching to lighter desktop environment, like Enlightenment , LXDE , or XFCE (and by the way, instructions for installing them you can find at What kinds of desktop environments and shells are available?) . But if you like the default desktop environment, you may want to download CompizConfig Settings Manager (available through Software Center or by typing in terminal sudo apt-get install compizconfig-settings-manager). Once you got it, uncheck "copy to texture", choose fast texture filter under OpenGL, and uncheck all effects. See the screenshots of my ccsm configuration bellow. Try experimenting with the settings, of course, but remember that this is a serious tool - you can break something with it, so use caution. IMHO, this is the best tool you can use to improve your experience with Ubuntu's default Unity desktop environment if your RAM or graphics card isn't that great.

enter image description here enter image description here enter image description here

Tweak the /etc/fstab file

Remember I've mentioned that everything is a read-write operation as far as a computer is concerned ? Linux updates information about when a file was accessed, even if a file was accessed only for reading; that means the system makes an unnecessary write to disk. What if you'd want to minimize unnecessary writes ? Sounds like a reasonable thing, especially in SSD - the less writes, the longer it lives. To do that, add noatime,reatime words to your /etc/fstab file, in the line with configuration for your hard drive. Example is bellow (Note that in SSD drive, only noatime is needed,for more info read Arch Wiki):

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda5 during installation
UUID=blahblahblahblah-blablah /               ext4    relatime,noatime,errors=remount-ro 0       1 

There's another hack to /etc/fstab file that I understand somewhat less, but in a nut shell is supposed to improve shared memory (and improving memory is a good thing, always). I've found it on CyberCiti blog. Basically, you'd add a line none /dev/shm tmpfs defaults,size=5G 0 0 and execute mount -o remount /dev/shm . Now , 5G is perhaps too much. On average my shared memory doesn't rise beyond 1M , so I'd say make it 1G or 500M.

Remove some unnecessary init scripts

Ubuntu at boot runs a set of scripts, that start services like network manager or bluetooth. This whole idea of init scripts may be a bit technica, but in a nutshell there's /etc/init and bunch of /etc/rc*.d folders, where * is a number. Almost all the time, ubuntu session uses stuff in '/etc/init' and /etc/rc2.d folders.

You might not want to start some services/scripts at all. For instance, bluetooth, or brltty, which is an accessibility feature for visually impaired. What I did is to comment out the start on command in /etc/init/bluetooth.conf like so

# bluez - bluetooth daemon

description     "bluetooth daemon"

# start on started dbus
stop on stopping dbus

env UART_CONF=/etc/bluetooth/uart
env RFCOMM_CONF=/etc/bluetooth/rfcomm.conf

With brltty.conf, I believe i completely removed any traces of that program and the config file. How about scanner script (S20saned) in /etc/rc2.d/ ? Well, you can rename it by using mv /etc/rc2.d/S20saned /etc/rc2.d/K20saned .

In fact, that's the same thing that can be done through BootUp-Manager or Startup applications, only in command line.

Limit number of processes for a user

I've actually learned this off CyberCiti's article on "fork bomb". Basic idea is to prevent a user from running to many processes, thus limiting the amount of memory a session eats-up.

Simply edit /etc/security/limits.conf file as such

someuser hard nproc 500

The article doesn't say what number would be reasonable, so its up to you to figure this out.

Other small ideas

  • tweak configurations and appearance with Unity Tweak Tool
  • Use dconf and gconf editors to alter system settings.
  • Removing unnecessary apps to free up disk space (self explanatory, right ?)
  • Try switching to HTML 5 rather than flash. On my laptop, in full screen youtube is painfully glitchy. Sure, my graphics card ain't that good, but hey, it works with HTML 5 so much much better, lag is much rare-er.
  • Clean cache regularly; Use BleachBit to clean everything up.
  • Get laptop enough air-flow by raising it, or using higher battery, or cooling stands (pretty cheap on amazon). Basically, avoid overheating
  • Get faster network adapter
  • avoid gaphically demanding apps. These days I'm writing much stuff in nano command line text editor - rarely go to OpenOffice.
  • check if your laptop is detecting all CPU cores, by using lscpu commands, and reading line Core(s) per socket. If it gives something other than what you supposed to have, you have a problem. There are patches for that, amd-microcode and for intel-microcode
  • read logs from /var/log folder, specifically dmesg and syslog.
  • try different desktop manager, like gdm
  • investigate running services with 'initctl list'
  • investigate which processes take lost of memory by using htop, ps aux, and top.

Conclusion

I've tried listing some of the tweaks I've done with my Ubuntu, but as I tend to do, I probably forgot something and might return to add details. Let me know if any of this is too technical and I'll try to explain in more simple terms. To other users - please let me know if I should add something or edit something. Cheerios!

0

You have the required amount of memory for Ubuntu; it's not clear what RubyMine requires - it says 2 GB, but is that system memory or additional? If it were system memory, it should specify the amount for each system, so it may be that this hog requires 2 GB in addition to the system memory.

Have you checked your memory (at the GRUB menu is a good place; let it run at least one full cycle). Since you're having a few other problems, there could be a problem with your memory. FWIW, I have had crashes with Chrome on multiple systems, which is the one of the reasons I use Firefox.

RubyMine is not supported here on AskUbuntu, but I've seen references to increasing memory doing a Google search. Doesn't it have a indicator telling you how much memory it's using vs how much is available? If that is marginal, it would be a problem; otherwise, it should not be.

0

I can recommend you installing Linux from Windows OS with "YUMI for Ubuntu Linux". If you have USB you can make it bootable and install from Multiboot USB Creator. There you have many distros available e.g lubuntu if you need lightweight distribution.

There are even small distros that take up less than 150MB. It is good also to check on what distros RubyMine can work. On Ubuntu it should be compatible with no problems installing.

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.