0

I installed ubuntu 14.04LTS lately on an old pentium 4 with 1Gb of ram. It was unusable. I moved to Xubuntu and added another Gb of ram for a total of 2Gb. I set the swapiness to 10. All these changes helped a lot. Now it's an usable desktop computer, but still a bit slow for what I need.

I'm using it to make PHP development so LAMP, Netbeans and Chrome are installed. The problem is that when typing in Chrome or Netbeans, the CPU tops to 100% all the time which is a bit annoying cause there is always lag when typing. The ram is ok, it's always below 1Gb (0 mb of swap) out of 2Gb when Netbeans and Chrome (with a few tabs) are opened.

Is there something I can do or my CPU is just not enough fast?

Thanks.

PS: I would like to keep using Netbeans.

Edit -> Output of cat /proc/cpuinfo

processor  : 0
vendor_id   : GenuineIntel
cpu family  : 15
model       : 2
model name  : Intel(R) Pentium(R) 4 CPU 2.40GHz
stepping    : 7
microcode   : 0x33
cpu MHz     : 2392.190
cache size  : 512 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fdiv_bug    : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 2
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr
bogomips    : 4784.38
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 32 bits virtual
power management:
10
  • Did you try using a utility to see what exactly is causing this? Just to be sure. You can use top in the terminal to take a look at the running processes.
    – verpfeilt
    Feb 8, 2015 at 22:03
  • 1
    Considering Lorenzo's answer, do you have HyperThreading enabled in the BIOS settings? If not, this could give you another boost especially with (multiple) multi-threaded applications like Chrome and Netbeans. Feb 8, 2015 at 22:15
  • I agree with @DavidFoerster and I also suggest to check the RAM speed configuration in the BIOS (maybe the RAM speed is set to DDR 3 but is DDR4). Also, remember that mixing different memory banks (DDR2 + DDR3 = downclock to DDR2) can slow down your system! Feb 8, 2015 at 23:03
  • 1
    No matter what you do, a P4 machine is not going to become new, it's still going to be old and slow by modern standards. That's the reality, so ditch Chrome and Netbeans, forget about the daemons, and don't expect too much. Feb 8, 2015 at 23:08
  • 1
    The problem usually is that though the desktop environment is variable of running on it, programs such as Chrome v ate still quite heavy - using a lighter web browser and reading softwarerecs.stackexchange.com/q/16489 might help.
    – Wilf
    Feb 8, 2015 at 23:55

2 Answers 2

3

You should upgrade your CPU or use a different, specialized distribution (like Lubuntu) for older hardware.
If you can't upgrade your hardware configuration, optimize your system by following those instructions:

  1. Install prelink and preload to reduce the startup time of many applications (like the sub-processes used by some IDEs).
    In a terminal (xterm or Terminal are fine) execute: sudo apt-get install prelink preload
    After the package installation, complete the configuration of prelink with: sudo PREFERRED_TEXT_EDITOR /etc/default/prelink
    Set the configuration variable PRELINKING to yes.

  2. Remove any non-essential daemon, like NTP, and replace heavy daemons, like the SSH daemon, with light versions. Remember to disable unnecessary network darmons, they can slow down your systems, specially during a network attack, like a brute force attack.

  3. Remove the search indexer, if present, with sudo apt-get purge apt-xapian-index; reboot.

  4. Configure your graphic card correctly (are DRI features enabled?) with the official Ubuntu guide.

  5. Follow the unofficial guide to speed-up Ubuntu.

You can also change your graphic enviroment to, for example, LXDE, which is less heavy.
I miss the old Pentium 4, but it's obsolete, sadly.
Please, comment under here if your have more questions and don't forget to press the left UP arrow and star if I'm of any help.

Good luck!

7
  • The processing power and to a lesser degree the lack of main memory really are the bottleneck here, not lack of pre-loading. Chrome and especially Netbeans are CPU- and memory hungry considering such an old system. Feb 8, 2015 at 22:14
  • Pentium 4 processors had clock rates from 1.3 to 3.8 Ghz. Its single-threaded performance should be on par or better than of, say, many budget laptops sold today. In fact, I'm typing this on a laptop with a 1.4Ghz CPU - I wouldn't be surprised if the OP's machine was faster than mine. I do use mine for development too :)
    – Sergey
    Feb 8, 2015 at 23:17
  • 1
    IMHO, all of the above is a waste of time. 1 Aren't those the kind of "non-essential" daemons you recommend removing in 2? 2 Daemons aren't much of a problem for a P4, and there is no reason to assume the OP is under attack, is there? 3 Again, likely not the main problem here. 4 Shouldn't be needed, unless you have anything specific to recommend. 5 That guide is a major time waster, but a good learning experience, at least for those interested. Feb 8, 2015 at 23:21
  • @mikewhatever I do not agree: 1) no they aren't; 2) yes, there is (ALWAYS), also, any daemon can be a memory and CPU waste; 3) no, a search indexer can slow down the whole system; 4) this is not a place for subjective opinions, help the user by posting guides, suggestions ecc. Please, the comments are for helping the user, not to chat and express personal opinions. Also, be OPTIMIST: there are many distributions made to resurrect older hardware and the Ubuntu developers are doing their best for sure. ;) Feb 8, 2015 at 23:51
  • @LorenzoAncora Can you recommend me a distro that would run LAMP, Chrome and Netbeans on a P4 without sweat. I'd very much like to test it. Also, I think my comments are helpful, otherwise I wouldn't be posting them. Feb 9, 2015 at 0:16
1

Your P4 is absolutely fine for text editing and running a LAMP stack (as long as you have the memory).

However this is the most frustrating thing I could say, but try to avoid big heavy IDE's for development, because they're so slow. NetBeans is a big heavy Java IDE, despite the heaviness, all it brings to the table is, a bit of file management; syntax highlighting; some refactoring tools; and perhaps a connection to xdebug.

You need to find leaner ways of developing, try vim or emacs (I have a personal preference to the former).

Vim would really suit your computer's specification as it can't actually use more than one thread.

3
  • I think you may be right. I thought my computer would be fine since Netbeans says the minimum requirements are 800Mhz P3 with 512Mb of ram. I guess I was wrong. It runs but I have to type slowly. Feb 10, 2015 at 2:05
  • Well they're probably being a little dishonest.
    – Rol
    Feb 10, 2015 at 5:13
  • Finally I installed Eclipse PDT which runs much smoother than Netbeans on my pc. I also installed Midori browser. It's lighter than chrome but I noticed a few display bugs. Feb 15, 2015 at 5:10

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.