Saturday, January 21, 2006

How to speed up eclipse on a Laptop: disable virus-scanner, partition disk, upgrade memory

I have a Dell Lattitude 600 with 1GB of memory. Starting eclipse and building workspaces is slow. So I was looking for ways to improve speed. Here is what I did over time:

  • Disabled the virus scanner for the eclipse directory and the workspace. McAfee's on-access-scan scans the entire file when a process accesses it. When eclipse starts is only reads small fractions of .jar files. However McAffee scanned the entire file which really slows down start-up by a factor of 2: cold start-up (=newly booted machine) 95 sec without versus 215 secs with virus scanner on.
  • Partitioned my disk: I tried all kinds of defragmentation (oodefrag and diskkeeper), but nothing really helped, some made it even worse.. However one problem is that compiling creates new files and that leads to new fragmentation. Now I created a relatively small partition with my workspace. Even if this gets totally fragmented, the disk head in confined within the partition. It gave me some speedup, but I have not measured it, but it was dramatic. I wish there was a defragmentation tool, that could observe the startup of eclipse and then rearrange the files so that the access is optimal. I know such tools exist for the startup .exe files, but we need something for the startup of a system like eclipse....
  • Upgraded the memory to 2Gb and disabled the page file: Yesterday, I did the upgraded and it's great. With 2 eclipse open, outlook, trillian, thunderbird, firefox, and a few other programs, I use about 1.5Gb of memory with enough space for the disk cache. That's a real blast: because no application gets paged out anymore, I don't have to worry about switching between applications. No more long interruptions when eclipse garbage collects. It's so new, I still can't believe that I don't have to wait anymore when I switch between applications. And 2 workspaces open in parallel is no problem anymore....

In a nutshell: It's all about minimizing disk access.

3 comments:

  1. Virus scanners are a pain most of the time. But you only really need to disable the contents of the plugins directory, and the .metadata directory since those are the two most accessed. Alternatively, it's possible to stop anything accessed by the eclipse.exe process from being investigated on access, which can also help.

    I also suspect that you mean 'partitioned' rather than 'pratitioned'. :-)

    Good call about the memory though. Windows has really bad paging stratagies. You've got to check that it doesn't turn it back on, by the way.

    It also helps if you're using 3.1+ since it includes configuration to persuade Windows not to swap Eclipse out:

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=85072

    ReplyDelete
  2. I think you really need to specify "java.exe" as process and not "eclipse.exe" as that is only the launcher.

    Ben

    ReplyDelete
  3. Your article is very inspiring. You have topped it up with excellent content. This will help me understand things from a fresh outlook.
    I would definitely recommend it to my friends as well.

    Also, take out sometime to review the best virus scanner for computer
    Free Malware Removal Tool. It is a virus, malware and other threat removal application for your PC.
    The app deep scans your system and removes infected files with no traces.

    ReplyDelete