I have performance issues in Isabelle (i.e., the resent version Isabelle2013-2).
I use Isabelle/JEdit, based on the new interface.
So before, the situation was I had some trouble with the performance. But now it is worse, as I sometimes have to wait up to 10 seconds sometimes to enter the right. The performance issues get worse over time, to the point were I have to restart Isabelle after an hour or so.
My suspicion is that I can configure Isabelle better or apply some tricks that improve the performance.
Hardware:
recent CPU, it's an intel i7 quadcore (mobile labtop chip), 16GB ram, fast SSD harddisk.
Software:
64bit arch linux (kernel 3.12.5-1-ARCH)
no 32bit compatibility libraries
my java version is:
java version "1.7.0_45"
OpenJDK Runtime Environment (IcedTea 2.4.3) (ArchLinux build 7.u45_2.4.3-1-x86_64)
My theory file has the size 125KB, the whole theory I am working is in one file, but at the moment I would really want to have just one file.
Symptoms:
Isabelle displays only about 900mb in the lower right corner of UI. I have 16GB RAM, should I configure java to use more RAM? Sometimes a singe process consumes 600% of the CPU, i.e., 6 cores that the linux kernel sees.
Tricks I use:
One trick is that I insert *) at a line below the code I am working on. This leads to a syntax error and the below code is not checked. The second trick is that I went to the timing panel, and all proofs that took longer than 0.2 seconds I commented out and replaced with sorry.
The resent two Isabelle versions are really great improvements!
Any suggestions or tricks to how I can improve the performance of Isabelle?
A few general hints on performance tuning:
One needs to distinguish Isabelle/ML (i.e. the underlying Poly/ML runtime) versus Isabelle/Scala (i.e. the underlying JVM).
Isabelle/ML: Intel CPUs like i7 have hyperthreading, which virtually doubles the number of cores. On smaller mobile machines it is usually better to restrict the nominal number of cores to half of that. See the "threads" option in Isabelle/jEdit / Plugin Options / Isabelle / General. When running on batteries you might even go further below.
Isabelle/ML: Using x86 (32bit) Poly/ML generally improves performance. This is only relevant to Linux, because that platform usually lacks x86 libraries that other platforms provide routinely. There is rarely any benefit to fall back on bulky x86_64. Poly/ML 5.5.x is very good at working in the constant space of 32bit mode.
Isabelle/Scala: JVM performance can be improved by using native x86_64 (which is the default) and providing generous stack and heap parameters.
The main Isabelle application bundle bootstraps the JVM with some options that are hard-wired in a certain place, which can be edited nonetheless:
Linux: Isabelle2013-2/Isabelle2013-2.run
Windows: Isabelle2013-2/Isabelle2013-2.ini
Mac OS X: Isabelle2013-2.app/Contents/Info.plist
For example, the maximum heap size can be changed from -Xmx1024m to -Xmx4096m.
The isabelle jedit command-line tool is configured via the Isabelle settings environment. See also $ISABELLE_HOME/src/Tools/etc/settings for some examples of JEDIT_JAVA_OPTIONS, which can be copied to $ISABELLE_HOME_USER/etc/settings and adapted accordingly. It is also possible to monitor JVM performance via jconsole to get an idea if that is actually a source of problems.
Isabelle/Scala: Isabelle bundles a certain JVM, which is assumed here by default. This variable elimination of Java versions is important to regain some sanity --- otherwise you never know what you get. Are you sure that your OpenJDK is actually used here? It is unlikely, unless you have edited some Isabelle settings.
Further sources of performance problems on Linux is graphics. Java/AWT is known to be much slower on X11 than on Windows and Mac OS X. Using the quasi-native GTK look-and-feel on Linux degrades graphics performance even further.
I have developed a Java application that normally run on Linux. It's a POJO application with Swing. Performance is reasonably good.
Now I tried to run it on Windows XP with 2Gb RAM, in a machine with similar or greater potency, and performance is much worse. I observe that it uses 100% CPU.
For example:
A process that creates a window very heavy, with many components: Linux 5 seconds, Windows 12.
A process that accesses a PostgreSQL DB with a heavy query (the server and the JDBC driver are the same): 23 seconds Linux, Windows 43.
I tried also with a virtualized Windows machine with similar features, and the result is significantly better!
Is it normal? What parameters can I assign to improve performance?
Unless you are comparing Linux and Windows XP on the same machine it is very hard to say what the difference is. It could be that while the CPU is faster, the GFX card and disk subsystem is slower.
Java passes all of this IO and GFX acitvity to the underlying OS and the only thing you can do differently is to do less work or work more efficiently. This is likely to make both systems faster, as there is not particular to one OS which you can tune.
Try running Java Visual VM (which is distributed as part of the JDK): attach to your application, then use the CPU Profiler to determine precisely where all that CPU time is going.
There may be subtle differences in the behavior of JRE parts (Swing comes to mind), where the JRE responds very unforgiving to a bad practice (like doing thing from the wrong thread in Swing).
Since you have no clues, I would try profiling the same use case in both environments and see if any significant differences turn up where the time is spent. This will hopefully reveal a hint.
Edit: And ensure that you do not run Windows with brakes on (aka. Antivirus and other 'useful' software that can kill system performance).
I would like to create Java applications, but my first “brake” is that it is impossible to run Netbeans at a decent speed under Ubuntu 9.10 with a Radeon X1300 Pro graphics card, P4 3.2GHz.
If I use other software, like Monodevelop or any other non-Java app, I don’t have this run-slow problem.
This could perhaps be my Radeon card with my high resolution (1600x1050), so would I be better off if I bought another video card? Or is it a problem with Linux, the Java Virtual Machine or something else?
Are there any settings I should try changing in the netbeans.conf file? Would setting opengl=true or any other settings improve my Netbeans experience?
If you can run Netbeans without problems, what PC configuration do you have?
I know this is not strictly a programming question, but it is about developer tools and configuration.
Your CPU speed is fine.
Your video card is powerful enough. Video driver issues are possible, but not terribly likely.
NetBeans is RAM-hungry, there's just no way around it:
Make sure you have enough free physical RAM on your machine when running NetBeans. Ask Google for information about how to inspect and watch memory usage for your OS.
Maybe try closing one or two other RAM-hungry apps, if you have them running.
Try using the Sun JDK/JRE, it is more heavily optimized than other offerings.
i think you should check your java virtual machine, i have used netbeans on various machines for java development and got no problems up to now.
I've run Netbeans on Ubuntu 9.10 and a Radeon card with no problems. One thing you may want to do is increase the memory size that the JVM allocates to Netbeans. this Netbeans wiki article should help you figure out how to configure it.
I have personally noticed Netbeans slowness on Fedora 14 under a couple conditions:
Using OpenJDK seems to be slower than Sun Java
Using the radeon open source video driver
I've been meaning to install fglrx on my laptop to confirm this hypothesis about #2. See this thread for more.
Hi I'm trying to test my JAVA app on Solaris Sparc and I'm getting some weird behavior. I'm not looking for flame wars. I just curious to know what is is happening or what is wrong...
I'm running the same JAR on Intel and on the T1000 and while on the Windows machine I'm able to get 100% (Performance monitor) cpu utilisation on the Solaris machine I can only get 25% (prstat)
The application is a custom server app I wrote that uses netty as the network framework.
On the Windows machine I'm able to reach just above 200 requests/responses a second including full business logic and access to outside 3rd parties while on the Solaris machine I get about 150 requests/responses at only 25% CPU
One could only imagine how many more requests/responses I could get out of the Sparc if I can make it uses full power.
The servers are...
Windows 2003 SP2 x64bit, 8GB, 2.39Ghz Intel 4 core
Solaris 10.5 64bit, 8GB, 1Ghz 6 core
Both using jdk 1.6u21 respectively.
Any ideas?
The T1000 uses a multi-core CPU, which means that the CPU can run multiple threads simultaneously. If the CPU is at 100% utilization, it means that all cores are running at 100%. If your application uses less threads than the number of cores, then your application cannot use all the cores, and therefore cannot use 100% of the CPU.
Without any code, it's hard to help out. Some ideas:
Profile the Java app on both systems, and see where the difference is. You might be surprised. Because the T1 CPU lacks out-of-order execution, you might see performance lacking in strange areas.
As Erick Robertson says, try bumping up the number of threads to the number of virtual cores reported via prstat, NOT the number of regular cores. The T1000 uses UltraSparc T1 processors, which make heavy use of thread-level parallelism.
Also, note that you're using the latest-gen Intel processors and old Sun ones. I highly recommend reading Developing and Tuning Applications on UltraSPARC T1 Chip Multithreading Systems and Maximizing Application Performance on Chip Multithreading (CMT) Architectures, both by Sun.
This is quite an old question now, but we ran across similar issues.
An important fact to notice is that SUN T1000 is based on UltraSpac T1 processor which only have 1 single FPU for 8 cores.
So if you application does a lot or even some Float-Point calculation, then this might become an issue, as the FPU will become the bottleneck.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
i have to work away from my desktop computer from time to time (for instance on trips). It is a low end laptop. I can use Eclipse but it is awfully slow.
Is there a better choice? If possible not something like vi oder emacs.
Laptop:
512 MB DDR RAM
Intel Pentium M 760 2.0 GHz
Windows XP SP3
There is no possibility to add more RAM
How low end is it? I used to use IntelliJ Idea and loved, it also ran faster than eclipse for me. DrJava is also very small and light weight. But personally I prefer vim + javac the best. :)
Netbeans is a little less sluggish than Eclipse, but it's a huge memory hog.
Emacs is always a fine choice too.
I actually don't consider that a "low end" machine.
I've used Eclipse and NetBeans on a P3 1.2 Ghz 512M RAM laptop, and they both run. They are a bit sluggish, but usable. Between the 2 I'd say NetBeans was less sluggish, probably because there aren't as many UI elements and frames all over.
My primary home laptop is a Toshiba 512M Pentium M 2 Ghz, and Eclipse runs fine on it (So does Visual Studio 2008).
It seems with these big IDEs, RAM > CPU at influencing speed.
Edit: it may be worth noting that my P3 1.2 Ghz laptop is running Ubuntu and my Pentium M 2 Ghz is running Win XP.
Eclipse is noticably faster in Linux. I once tested large project build times in:
WinXP running Eclipse
-vs-
WinXP Running VMWare Workstation Running Ubunty Running Eclipse
Suprisingly, Ubuntu in VMWare was consistently much faster, about 30-sec faster over what was a 7-minute build process on Windows.
You Could try JEdit, while it is not a true IDE, it does support a ton of Java centric functions like source formatting, syntax highlighting, and a java debugger, and bunch of other functions all of which can be added/subtracted via a plugin system. I've used it in the past when I wanted something with more power than notepad, but less bulky than Eclipse.
It's all open source and free, and portable to most systems since it is written in Java.
A nice lightweight editor is Notepad++. Based on a powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size. By optimizing as many routines as possible without losing user friendlyness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment.
I guess it is the JCreator Pro.. The free version, JCreator lite is OK but have limited capabilities.
You might have a look at BlueJ
The older versions of IntelliJ IDEA like 3,4,5 can run easily on that memory - provided you don't have a huge project, and are willing to miss out on some features in the new versions.
I haven't tried it yet, but recently stumbled upon JCoder, which is a Java IDE written in C++. Minimum memory requirement stated is 512MB.
Also, you could consider running an older version of Eclipse, and/or trying to tune Eclipse to run better on your hardware. A Google search for "Eclipse performance tuning" is turning up a bunch of pages with suggestions that may be applicable.
Text editor plus the Java console are your best tools if you are on a low end computer and you don't need debugging and such.
It really depends on your project more than the actual piece of hardware, so you need to think about it with pros and cons.
Good luck.
I was always partial to JCreator back in the day.
you can use netbeans with only the modules your using (same thing with eclipse) or geany (using linux?) not a ide but a really nice text editor with ide functionalities
other option is using netbeans/eclipse older versions that are way more efficient
Get more memory if you can.
SciTE, JUnit, Ant and jvisualvm used to run fine on my notebook, which had 768M, or the 2GB/1GHz netbook I now use. On the rare occasions you must use a debugger, then there's always jdb. The problems I've had with IDEs on notebooks are more to do with screen estate rather than performance. OTOH I gave up on Netbeans as its text editor was too slow on a 'standard built business desktop' machine last time I was contracting.
gvim + ctags + ant
You will run out of memory if using almost ANY modern AppServer anyway.
I hope you're not.
I have been using E Text Editor, a port of TextMate and am loving it. Comes with built in syntax highlighting, snippets, can download TextMate bundles and fully customizable/extendible in ruby.
I occasionally use TextPad for simple Java programs. It's very lightweight, free (well, nagware, but inexpensive to buy) and has a simple to use compile and run option. Also syntax highlighting, though I've never used it.
The important question is what features you think should be in a good IDE.
Code completion? JavaDoc in mouse overs? "Go to definition"? Built-in debugger? Syntax highlighting? Incremental compilation?
A good place to start, would be to get the code to build with ant as it allows you to move this out of the IDE where it hopefully needs less space to run.
I believe the requirements of older versions of JBuilder were quite low. You might want to buy a used one for this purpose.
Is there a chance of upgrading the laptop's memory? CPU doesn't matter much, but IDEs are nearly always huge memory hogs (even EMACS was considered that in its time).
I'd say that you can run eclipse quite well in 1GB (maybe even 512MB) using windows XP, if you don't do huge projects and don't run any other massive apps at the same time.
As long as I already have a project set up, I use vim/gvim for most maintenance development or fooling around.
First of all, memory is the problem.
Linux performs fairly well with low memory, but pc isn't great and mac is abysmal! (if you have 512M and less than 4gb hard disk free, it will barely work at all! This is because the mac allocates it's swap from "Free space" on your hard drive)
Macs are easy to upgrade though. I got 4gb for my laptop at fry's for less than $100, and the slots are inside the battery compartment. After the upgrade, my bottom-of-the-line mac has never once given me a single time to be concerned about its' performance.
PCs are more difficult than the mac, but vary based on model.
Okay, so let's say you don't want to upgrade.
The most important thing to do then is to be sure you have a local copy of the Javadocs. You'll miss them VERY QUICKLY if you don't have eclipse/netbeans.
After that, who cares what editor you use. Personally I'd use the built-in editor because I'm not actually that impressed with coloring and auto-formatting.
If you need context coloring, I guess vim would be the most light-weight editor with a Java mode (at least I believe it has one). JEdit is fairly light-weight, and so is emacs and I know they both have java modes.
For builds just use ant or maybe maven, building in the IDE is nice but overrated.
The biggest thing, as I said, is always have the javadocs on a browser bookmark.