Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slower on the intranet network #1391

Open
balanx opened this issue Apr 21, 2024 · 9 comments
Open

Slower on the intranet network #1391

balanx opened this issue Apr 21, 2024 · 9 comments

Comments

@balanx
Copy link

balanx commented Apr 21, 2024

os is win10
sbt 1.7.3
scala 2.12.18
java 11.0.19
SpinalHdl is 1.10.1

First, I compiled and run SpinalTemplateSbt at the PC connecting to Internet. It's OK.

[Runtime] SpinalHDL v1.10.1    git head : 2527c7c6b0fb0f95e5e1a5722a0be732b364ce43
[Runtime] JVM max memory : 4078.0MiB
[Runtime] Current date : 2024.04.21 21:40:31
[Progress] at 0.000 : Elaborate components
[Progress] at 1.698 : Checks and transforms
[Progress] at 1.949 : Generate Verilog
[Done] at 2.243

Then, I only copied whole running environment to the other PC on the intranet, including "./sbt, ./ivy2" etc.
SpinalTemplateSbt (new and clean) can be run OK too, but there was one difference as the following,

[Progress] at 113.412 : Generate Verilog
[Done] at 1.918

The step "Generate Verilog" is very very slower !
What is the possible reason for this ?

@Dolu1990
Copy link
Member

Hi,

Hmm, it being so slow is realy weird.
I do not see a good reason for it to be related to the network itself.
In general when things get that slow on a given machine, it is more related to the amount of memory allocated to the JVM
What is reported by the :
[Runtime] JVM max memory : ????

@balanx
Copy link
Author

balanx commented Apr 22, 2024

Thanks for your reply.
Mm, I'll try ...

@balanx
Copy link
Author

balanx commented Apr 28, 2024

I tried .
It will be normal after I turn off network at the "win10 / setting / network / ethernet / local connection" of the intranet PC.
Turn on again , the problem is reproduced.

@andreasWallner
Copy link
Collaborator

andreasWallner commented Apr 28, 2024

Have you checked if there is some other tool that consumes more CPU when your network is turned off?
SpinalHDL is not accessing the network, so this seems really weird...

Also: Did you check whether the JVM memory config is the same if there is no network, like @Dolu1990 asked?
Please post the full output of the fast/slow generation so that we can see where the time is spent.

@balanx
Copy link
Author

balanx commented Apr 29, 2024

Have you checked if there is some other tool that consumes more CPU when your network is turned off? SpinalHDL is not accessing the network, so this seems really weird...

Also: Did you check whether the JVM memory config is the same if there is no network, like @Dolu1990 asked? Please post the full output of the fast/slow generation so that we can see where the time is spent.

The occupancy rate is very low regardless of whether the network is turned on or off.
The JVM memory config is the same regardless of whether there is internet.

I am just descripting how I have tried to solve the problem.
Again, I doubted sbt and tried to use mill instead. The result is as follows.

mmexport1714393246771

@Readon
Copy link
Collaborator

Readon commented Apr 30, 2024

I think it's necessary to run a profiler to capture what's the primary time-consuming parts.

@Dolu1990
Copy link
Member

That is so weird XD
Is it only on windows ?

@balanx
Copy link
Author

balanx commented May 1, 2024

@Readon may you give me a instruction for profier ?
@Dolu1990 I will try when I have the conditions.

@andreasWallner
Copy link
Collaborator

@balanx if you are willing to to debug this, these instructions worked for me (though I'm on linux, so some details will be different for sure):

But: considering the huge slowdown, it might be just as feasible to find what's the slow part by inserting print statements with the time/delta and doing binary search manually - might be much simpler then setting up the profiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants