For your issue, try turning on swap in Ubuntu, something like this:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04I would use at least an 8GB swap file if you have plenty of free space on your drive, that will give you room later if needed.
As for BiTJack, you can ignore her/his advice, he is still are wrong and just doesn't know it. First, BiTJack:
1. He isn't talking about Windows.
2. Windows has had *known* memory issues even with the 4GB of RAM and 32 bit windows - for example, see this
https://bitcoin.org/bin/0.9.0/README.txt http://www.coindesk.com/bitcoin-fixes-bugs-updates-block-size-limits/There have been frequent reports of Windows users running out of RAM on 32 bit systems during the initial sync even with 4GB of RAM, let alone 2 GB.
"Ram is only prior to running the program when you have a running qt no matter what windows will reserve the memory for it." makes no sense. RAM can and is allocated dynamically. There are many threads discussing the issue with initial sync and low memory on Windows and other systems.
In short, 2GB is not enough memory in many, many cases for an initial sync. 4GB can have problems on 32 bit Windows also.
Running Bitcoin-QT requires both computer performance & bandwidth. (Like many other programs)
Ain't it common sense that it is required to run programs in any platform.
Syncing has nothing to do with your RAM check your bandwidth slow connection slow syncing and Check if there's enough space.
Currently blockchain takes 27.6 Gig of space.
Yes it does. Please do some homework prior to dismissing something like that. You do not know what you are talking about.
If you are running Linux, turn swap on. If you are running Windows, you can check to see what else is running. Ditto Mac OS X.
Edit: As Welsh said, bandwidth (and having a fast peer) is important too. Future versions will sync from multiple nodes which should speed this up.
Running a non gui program in windows requires ram too it's a matter of common sense that it is required. The question relates to Syncing.
Ram is only prior to running the program when you have a running qt no matter what windows will reserve the memory for it.
Yes, you can check and stop what else is running and what's taking more memory. In Op's case it's more than enough.
If the program is running fine and and you can't sync up it's either the hard drive space or the internet connectivity.