last day (15 days later) » 

2:18 PM
0
Q: How to force concurrency to shell and program in ubuntu 18.04

Thuriya ThwinI am facing the problem that in window I unlock all cores of cpu and edit registry to make programs faster.But,in ubuntu 18.04 how can I do? I found a tutorial that sudo gedit /etc/init.d/rc and edit concurrency=shell but it does not work on ubuntu 18.04lts Now ,my program is faster in win...

 
Linux has no registry. And all cores of the CPU is in use by default; there's nothing to unlock. If your program is multithreaded it will execute on multiple CPUs, if it's single threaded, it won't.
 
But,my program run faster on window @vidarlo
 
What is your program? And this is an X-Y Problem. State your problem, not some detail about what you believe the solution to be :)
 
I force all cores on window and make cores affect on N-Queen problem with backtracking.
In window ,the run time is 290s when N=28 and in ubuntu the run time is 310s.
 
But what is the program you are running? Is it running inside some framework? Is it multithreaded? The Linux execution time is 107% of the Windows execution time ; if it was multithreaded under Windows, and single threaded under Linux, I would expect a much bigger difference (200% or more).
Based on your other questions I'm guessing you're using Mathematica or similar to run your program. In this case, it may be down to the level of optimization performed on the interpreter of your program.
In any case, a <10% difference in speed is more likely to be down to random artifacts than the number of CPU's used. Different OSes behave in different ways, different compilers behave in different ways and so forth.
 
2:21 PM
I am running in intellij using same version and same jdk and not multithreated
Is there any way to make ubuntu make faster.
 
If it's not multithreaded, more cores won't help you, except for making one core available more of the time. And it can be down to differences in the compiler used to make the Java binaries on different platforms, or a lot of other factors.
 
In window ,more cores affect single thread?
 
no
a single thread cannot be executed on more than one core.
A better question would be why your program is 6-7% slower on Linux than on Windows.
 
Yes,right.
I don't accept that ,I think I need to tweak ubuntu .
 
why?
 
2:26 PM
Is this relate with jvm to give more ram ?
 
possibly. I don't know the N-queen problem, so I don't know if it's memory intensive or not
 
Yes,it is memory intensive alot.
 
But again; state your actual problem - that your problem is 6-7% slower, not what you believe the solution to be
but the bottomline may be that different compilers produce different code, different operating systems do things in different ways etc.
 
Because I use same IDE version,same jdk version,same code,same machine.I think it should be the same.
 
The compiler that compiled your JDK is probably not equal in those two cases.
Anyway
I suggest you edit your question into something like this:

I'm running a N-Queen solver, with N=28, in IntellJ.

In Windows this takes 290 seconds to run, whilst on Ubuntu it takes 310 seconds to run.

Why is it slower on Ubuntu than on Windows? I use the same JDK on Windows and Linux.

The program is single-threaded.
That's a better question :)
 
2:31 PM
Thanks for you value advice.
I will edit,later.
 
:)
best of luck in finding a good answer.
 
Could you give me your email address to me?
 
why?
 
I think you could help in later cases when I trouble.
 
se@bitsex.net works, but I can't guarantee I'll answer.
 
2:34 PM
Thanks for your kindness.
Bye
 

last day (15 days later) »