Too Slow execute ROOT in WSL

Hi Root Masters!

I built a new workspace using a different platform and ROOT version.
New OS is Window [Previous was OS x]
I used ‘Hyper TM’.

I installed wsl with Ubuntu newest version and ROOT also successfully installed.
but When I sourced ROOT and entered ‘root -l’, the opening speed is too slow.
[ Some calculation or other processing is work well tho]

Is there any way to make it faster than now?

Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.28/02
_Platform: Ubuntu 22.04.2 LTS [Window WSL]
_Compiler: gcc 11.3.0

The first time you start ROOT always takes a long time (try to “.q” and start “root” again, in the same window).

Hi and Thank you for your reply.

My case is the first time ROOT is starting and every time.
the thing I tried is,

  1. coding some tool that read csv file and save into TTree
  2. second code will read the root file which contained TTree made previously and draw a few histograms.

In order to make several versions of TTree file, I ran ROOT many time.
But every single start always showed very slow loading.

In this case, Is My environmental problem?

Are you re-using the same terminal window, or do you always open a new one?

Of course not.
I re-use the same terminal window always. (personally, I don’t prefer to use a new terminal.)

around 15 sec is needed to see ‘root [0]’ after entering the ‘root’
On the other hand, my old set-up immediately showed ‘root [0]’ as usual.

WSL 1 or 2 (better 2, I think)?
Do you have enough RAM (at least 8GB)?
Try with the “Terminal Windows” for the bash console.

What kind of computer is this? Is ROOT on a local disk? What is the disk speed (I’m sure there are Windows tools out there to measure that.) What is the output of time root.exe -l -q?

@Wile_E_Coyote Hi Sorry for late reply. WSL is version 2. But I’m wondering that the wsl version is really a problem…
RAM is enough. totally 16 GB.

@Axel Yes. I installed ROOT on my local disk.
disk speed is roughly 460 MB/s for read and 380 MB/s for write. (I checked this by winsat)
and output of time root.exe -l -q is
real 0m15.190s
user 0m0.245s
sys 0m1.915s

Is the problem only seen with ROOT? Is anything else fast to open? e.g. xeyes, xcalc, python,… maybe try installing a few other ‘graphical’ apps and see if they load slowly too (in which case it would probably not be a ROOT issue, and you could try reinstalling Ubuntu, even WSL too, to start from scratch).

which root.exe ; which root.exe ; which root.exe
time root.exe -l -q ; time root.exe -l -q ; time root.exe -l -q
time root.exe -b -l -q ; time root.exe -b -l -q ; time root.exe -b -l -q

@dastudillo Hi ! I think the problem only seen with ROOT. I’m currently using python3.9 and other ‘graphical’ app (e.g matplot, seaborn, so on) as well. but the loading of some images by Python script is showing up very quickly. Actually, ROOT loading speed itself is too slow. the processing (Tree read & write, function fitting) seems no problem.

First part was done very quickly. so I could see the path of ROOT immediately.
Below is the result of second the thrid command.

:$ time root.exe -l -q ; time root.exe -l -q ; time root.exe -l -q

real    0m16.484s
user    0m0.238s
sys     0m2.292s

real    0m15.527s
user    0m0.260s
sys     0m2.102s

real    0m16.122s
user    0m0.264s
sys     0m2.294s

:$ time root.exe -b -l -q ; time root.exe -b -l -q ; time root.exe -b -l -q

real    0m16.204s
user    0m0.335s
sys     0m2.108s

real    0m16.457s
user    0m0.251s
sys     0m2.185s

real    0m16.062s
user    0m0.248s
sys     0m2.061s

Do you have any “.rootrc” or “rootlogon.C” files?

I remember similar problems from a long time ago:

Maybe a good idea is really to completely uninstall/remove everything (the Ubuntu machine and the WSL itself), then reboot Windows and start from scratch again.

1 Like

@Wile_E_Coyote Ohha! yes… you know :frowning: that will be a huge job. But I will try! :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.