IntelliJ 5.1.1 slow on Linux and can't run agent

I've been trying to figure out why my IntelliJ is running slow on Linux. When ever I interact with the GUI the Java process spikes the CPU to around 90-100%. I've found the knowledge base article on grabbing snapshots, but everytime I try the -Xrunyjpagent:port=10100 in idea.vmoptions I get this error:

Error occurred during initialization of VM
Could not find agent library on the library path or in the local directory: yjpagent

Any suggestions on fixing this error or getting IntelliJ to speed up would be much appreciated. Thanks.

15 comments
Comment actions Permalink

There must be libyjpagent.so file in the $IDEA_HOME/bin directory and this directory must be IDEA working dir in order for the
library to be found.
Did you do a clean IDEA install or installed over the old installation?
--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Brian Pontarelli" <no_reply@jetbrains.com> wrote in message news:25600351.1145975505529.JavaMail.itn@is.intellij.net...

I've been trying to figure out why my IntelliJ is running slow on Linux. When ever I interact with the GUI the Java process spikes
the CPU to around 90-100%. I've found the knowledge base article on grabbing snapshots, but everytime I try
the -Xrunyjpagent:port=10100 in idea.vmoptions I get this error:

>

Error occurred during initialization of VM
Could not find agent library on the library path or in the local directory: yjpagent

>

Any suggestions on fixing this error or getting IntelliJ to speed up would be much appreciated. Thanks.



0
Comment actions Permalink

New install of 5.1.1. Here's my dir listing:

bpontarelli@w2:~/dev/naymz$ ll /opt/programs/idea-5.1/bin/
total 1584
drwxr-xr-x 2 bpontarelli dev 4096 Apr 25 11:30 .
drwxr-xr-x 9 bpontarelli dev 4096 Apr 25 11:30 ..
-rw-rr 1 bpontarelli dev 137 Apr 25 09:21 appletviewer.policy
-rwxr-xr-x 1 bpontarelli dev 104 Apr 25 09:21 degenerate.sh
-rw-rr 1 bpontarelli dev 692 Apr 25 09:21 idea16.png
-rw-rr 1 bpontarelli dev 1875 Apr 25 09:21 idea32.png
-rw-rr 1 bpontarelli dev 4530 Apr 25 09:34 idea.properties
-rwxr-xr-x 1 bpontarelli dev 1829 Apr 25 09:34 idea.sh
-rw-rr 1 bpontarelli dev 41 Apr 25 09:34 idea.vmoptions
-rwxr-xr-x 1 bpontarelli dev 2144 Apr 25 09:21 inspect_diff.sh
-rw-rr 1 bpontarelli dev 842 Apr 25 09:21 inspection16.png
-rw-rr 1 bpontarelli dev 1231 Apr 25 09:21 inspection24.png
-rw-rr 1 bpontarelli dev 2186 Apr 25 09:21 inspection32.png
-rw-rr 1 bpontarelli dev 2948 Apr 25 09:21 inspection48.png
-rwxr-xr-x 1 bpontarelli dev 31 Apr 25 09:21 inspect.sh
-rw-rr 1 bpontarelli dev 6185 Apr 25 09:21 libbreakgen.so
-rw-rr 1 bpontarelli dev 31556 Apr 25 09:21 libjniwrap.so
-rw-rr 1 bpontarelli dev 955368 Apr 25 09:21 libp4api.so
-rw-rr 1 bpontarelli dev 534620 Apr 25 09:33 libyjpagent.so
-rw-rr 1 bpontarelli dev 5382 Apr 25 09:34 log4j.dtd
-rw-rr 1 bpontarelli dev 1836 Apr 25 09:34 log.xml

The agent file exists, is readable and should work.

0
Comment actions Permalink

Any other ideas of how to setup the agent?

0
Comment actions Permalink

Looks like the working directory for IDEA process is not $IDEA_HOME/bin
Anyway, the easiest way to fix this would be adding the "$IDEA_HOME/bin" to the java library path in VM options:
-Djava.library.path=$IDEA_HOME/bin


--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Brian Pontarelli" <no_reply@jetbrains.com> wrote in message news:33185424.1145982903376.JavaMail.itn@is.intellij.net...

New install of 5.1.1. Here's my dir listing:

>

bpontarelli@w2:~/dev/naymz$ ll /opt/programs/idea-5.1/bin/
total 1584
drwxr-xr-x 2 bpontarelli dev 4096 Apr 25 11:30 .
drwxr-xr-x 9 bpontarelli dev 4096 Apr 25 11:30 ..
-rw-rr 1 bpontarelli dev 137 Apr 25 09:21 appletviewer.policy
-rwxr-xr-x 1 bpontarelli dev 104 Apr 25 09:21 degenerate.sh
-rw-rr 1 bpontarelli dev 692 Apr 25 09:21 idea16.png
-rw-rr 1 bpontarelli dev 1875 Apr 25 09:21 idea32.png
-rw-rr 1 bpontarelli dev 4530 Apr 25 09:34 idea.properties
-rwxr-xr-x 1 bpontarelli dev 1829 Apr 25 09:34 idea.sh
-rw-rr 1 bpontarelli dev 41 Apr 25 09:34 idea.vmoptions
-rwxr-xr-x 1 bpontarelli dev 2144 Apr 25 09:21 inspect_diff.sh
-rw-rr 1 bpontarelli dev 842 Apr 25 09:21 inspection16.png
-rw-rr 1 bpontarelli dev 1231 Apr 25 09:21 inspection24.png
-rw-rr 1 bpontarelli dev 2186 Apr 25 09:21 inspection32.png
-rw-rr 1 bpontarelli dev 2948 Apr 25 09:21 inspection48.png
-rwxr-xr-x 1 bpontarelli dev 31 Apr 25 09:21 inspect.sh
-rw-rr 1 bpontarelli dev 6185 Apr 25 09:21 libbreakgen.so
-rw-rr 1 bpontarelli dev 31556 Apr 25 09:21 libjniwrap.so
-rw-rr 1 bpontarelli dev 955368 Apr 25 09:21 libp4api.so
-rw-rr 1 bpontarelli dev 534620 Apr 25 09:33 libyjpagent.so
-rw-rr 1 bpontarelli dev 5382 Apr 25 09:34 log4j.dtd
-rw-rr 1 bpontarelli dev 1836 Apr 25 09:34 log.xml

>

The agent file exists, is readable and should work.



0
Comment actions Permalink

Just do
export LD_LIBRARY_PATH=/usr/bin/idea-5.1.1/bin:$LD_LIBRARY_PATH
before you run Idea, replacing the first bit with the appropriate path
of course (or you could hack your Idea startup script)
R

0
Comment actions Permalink

Looks like idea.sh has a bug in it. This line:

LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH

should be

LD_LIBRARY_PATH=$IDEA_BIN_HOME:$LD_LIBRARY_PATH

0
Comment actions Permalink

Turns out that wasn't the problem. Now I'm just totally confused. I went ahead and executed the java command by hand and even setup the library path by hand and I still receive the error. There must be something wrong with the SO file or something else is happening. Any additional insight would be greatly appreciated.

0
Comment actions Permalink

I figured this out! Haha this is really funny! The problem was JDK logging. I had a JRE installed that had a default logging level of FINEST for everything. Well, the JDK apparently does a LOT of logging in the AWT X-Windows implementation. I mean it does a TON of logging. Well, everytime you interact with the GUI it would generate around 1,000 lines of logging and it was in a constant state of logging around 1,000-5,000 lines per minute or so because it logs in the event loop. Needless to say, this made the GUI run really slowly.

So, if your GUI is running poorly, check your JDK 1.4 logging configuration to ensure that everything is set to SEVERE logging. I don't even mess around with INFO. You could use WARNING and probably be safe, but if you want the best performance of the JDK for anything, I'd use a default of SEVERE. You can always tweak it at runtime if you absolutely have to.

0
Comment actions Permalink

Can you tell me how to set this logging level?

"Brian Pontarelli" <no_reply@jetbrains.com> wrote in message
news:3102518.1146148820319.JavaMail.itn@is.intellij.net...

I figured this out! Haha this is really funny! The problem was JDK

logging. I had a JRE installed that had a default logging level of FINEST
for everything. Well, the JDK apparently does a LOT of logging in the AWT
X-Windows implementation. I mean it does a TON of logging. Well, everytime
you interact with the GUI it would generate around 1,000 lines of logging
and it was in a constant state of logging around 1,000-5,000 lines per
minute or so because it logs in the event loop. Needless to say, this made
the GUI run really slowly.
>

So, if your GUI is running poorly, check your JDK 1.4 logging

configuration to ensure that everything is set to SEVERE logging. I don't
even mess around with INFO. You could use WARNING and probably be safe, but
if you want the best performance of the JDK for anything, I'd use a default
of SEVERE. You can always tweak it at runtime if you absolutely have to.


0
Comment actions Permalink

Did you manage to get the profiling agent running?
R

0
Comment actions Permalink

Hello,

I got the same problem trying to get the profiling running.

I tried to add the path to the lib in the LD_LIBRARY_PATH but I still get the same error.

I'm running fc5 on an x86_64 smp

thanks for any help

Franck

0
Comment actions Permalink

I really wish jetbrains would address the horrid linux performance. It is slow slow slow.

0
Comment actions Permalink

Hello fugowie,

f> I really wish jetbrains would address the horrid linux performance.
f> It is slow slow slow.

Unfortunately we are unable to address problems for which we don't know any
details at all.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

There have been many threads in this forum all stating that performance on Linux is really bad and has been since about 4.5, this is just one of them. In my case, I'm running 5.1.2 on a dual core 3.2 ghz p4 with 1G of memory on Fedora Core 4.

Performance varies but most of the time simple editing is incredibly slow. while moving the cursor up and down in a window X can consume from 20 to 50% of the cpu. Note, this is a multihead machine using xinearma on an nvidia card, i'm not sure if there is a relationship.

I'd be happy to provide profiling.

0
Comment actions Permalink

Hey Fugowie,

Did you ever find a solution for this?

Im having the exact same problems as you. IntelliJ on Linux is slow. Anytime I move to a new editor window, my processor spikes to like 100% usage.. Im also using xinerama on a nvidia care.

- m

0

Please sign in to leave a comment.