0

I have a very unexpected behavior with my Java Code, I am working on ML-algorithms, and my code executes more than 15 times faster when I use "Run File" in my IDE (NetBeans 7.0.1) than when I execute exact same classes and inputs from a terminal (Konsole 2.11.3). I am running Mint Linux.

Case #1 NetBeans:

...
99.69348%
99.808426%
99.92337%
Total FS time: 830ms
Converting Test Data...
Test Data Ready!
...

Case #2 Konsole:

...
99.69348%
99.808426%
99.92337%
Total FS time: 15496ms
Converting Test Data...
Test Data Ready!
...

You may ask what I have tried but.... I really have no idea where to start, the classes are literally the same, as well as the input, I opened my System Monitor and noticed that when I run the file from NetBeans, it can use all my CPU threads (8), and when running from Konsole it only uses 1, I think that! is causing the delay but as far as I know is the O.S who is in charge about how to use the CPU cores.

Hopefully somebody could point me in the right direction. Maybe a Profiler could help?

RandomGuy42
  • 301
  • 4
  • 14
  • How about you included the code you are running? – fge Mar 26 '14 at 07:06
  • Maybe this link can give you some clue, I just wander the same question that is your program has a lot of IO? http://stackoverflow.com/questions/10534477/why-does-a-project-run-faster-in-netbeans-internal-terminal-than-in-windows-co – lowitty Mar 26 '14 at 07:08
  • @fge It is quite long to include, however, is there really any useful information that can be obtained from the code? my tests uses the exact same classes. Literally same files. – RandomGuy42 Mar 26 '14 at 07:11
  • @lowitty I/O to files? No, it just 1) Read a file 2) do a lot of maths 3) write the file back. If I/O to Konsole(Terminal), I removed prints for testing, same case. What worries me is the CPU usage. NetBeans = 8 Cores vs Konsole = 1 Core – RandomGuy42 Mar 26 '14 at 07:15

0 Answers0