# Latency with v1.11-rc3 REPL over SSH

**URL:** https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498
**Category:** General Usage
**Created:** [September 17, 2024, 6:03am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498 "2024-09-17T06:03:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 17, 2024, 6:03am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/1 "2024-09-17T06:03:36Z")

</div>

I have a noticeable latency in 1.11-rc3 than in 1.10.5, when working locally it isn’t noticeable, but when using Julia through ssh it is quite noticeable.

More info: It’s worst when starting the REPL and it gets smoother over time, like if functions are compiling in the background.

---

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [September 17, 2024, 2:55pm UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/3 "2024-09-17T14:55:48Z")

</div>

> [@Qfl3x](#):
>
> It’s worst when starting the REPL and it gets smoother over time, like if functions are compiling in the background.

Starting `julia` with `--trace-compile=stderr` should print a message for each method that gets compiled. Replacing `stderr` with a file name should output to that file. Could you try comparing what gets compiled on REPL startup with and without SSH?

---

<div class="post-metadata">

### Author: ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)
#### Post date: [September 21, 2024, 7:32pm UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/4 "2024-09-21T19:32:12Z")

</div>

Could you describe the latency in more detail? Do you experience it when you are typing? After you push enter?

---

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 27, 2024, 7:46am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/5 "2024-09-27T07:46:59Z")

</div>

Julia takes a tad bit longer to start, and when I start typing, and when I press enter. It’s also present when printing to stdout.

There’s also substantial slowdown especially when precompiling packages, it takes me longer to precompile on the HPC cluster than it takes me to precompile and train the model on my laptop. The only thing I can think of is that there is a lot of file I/O since that may be the only place where there is a big difference between the cluster and my laptop.

---

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 27, 2024, 7:47am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/6 "2024-09-27T07:47:12Z")

</div>

There’s no difference between the two.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [September 27, 2024, 8:14am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/7 "2024-09-27T08:14:41Z")

</div>

Can you share which CPU you use on the cluster and which on the laptop?  
You can find out with the command

```julia
cat /proc/cpuinfo | grep 'name'| uniq

```

Often server CPUs have much lower clock speeds than desktop (and even laptop) CPUs.

---

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 27, 2024, 8:18am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/8 "2024-09-27T08:18:52Z")

</div>

Cluster: AMD EPYC 7662 64 cores  
Laptop: i7 13700H

Another Cluster also has a Xeon Silver (probably slower single core than my laptop), but it’s always slow whether I’m using the powerful EPYC or the Xeon.

In 1.10 there isn’t much slowdown.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [September 27, 2024, 8:50am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/9 "2024-09-27T08:50:37Z")

</div>

> [@Qfl3x](#):
>
> i7 13700H

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/e/7e1295e9d01ba9141b424ad32de0a5c7118c37ea.png)

The EPIC might be powerful, but still has a much lower single-core performance than your laptop.

In addition, 1.11 moved a lot of code out of the default system image to packages, which, if not correctly pre-compiled slows down the start-up time.

---

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [September 27, 2024, 8:51am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/10 "2024-09-27T08:51:52Z")

</div>

Maybe Julia somehow fails to recognize the architecture precisely? If so, it should be possible to regain (most of the) performance using the `--cpu-target` option to `julia`, I think:

[https://docs.julialang.org/en/v1.11-dev/manual/command-line-interface/](https://docs.julialang.org/en/v1.11-dev/manual/command-line-interface/)

---

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 27, 2024, 8:58am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/11 "2024-09-27T08:58:30Z")

</div>

It appears to be faster when I set cpu target to znver2 (Zen 2), will test some more.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [September 27, 2024, 9:06am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/12 "2024-09-27T09:06:22Z")

</div>

> [@Qfl3x](#):
>
> znver2

With Julia 1.11 you also have `znver3` and `znver4` available.

---

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 27, 2024, 9:11am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/13 "2024-09-27T09:11:39Z")

</div>

I thought that in my case since this is a Zen 2 CPU I should set to znver2, or is it irrelevant?

---

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 27, 2024, 9:16am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/14 "2024-09-27T09:16:05Z")

</div>

Actually, speaking of target, I often get the message “cache misses: target mismatch” while precompiling packages, even now with `-C znver2`.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [September 27, 2024, 9:22am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/15 "2024-09-27T09:22:24Z")

</div>

It is relevant to choose the heighest cpu version that matches your target.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [September 27, 2024, 9:23am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/16 "2024-09-27T09:23:00Z")

</div>

Did you clear your cache after adding the parameter znver2?

---

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 27, 2024, 9:23am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/17 "2024-09-27T09:23:25Z")

</div>

No, probably why I get a cache miss.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [September 27, 2024, 9:34am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/18 "2024-09-27T09:34:46Z")

</div>

You could delete the `.julia` folder if you are brave.

As long as you are using `juliaup` everything gets re-installed automatically.

---

<div class="post-metadata">

### Author: ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)
#### Post date: [September 27, 2024, 9:51am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/19 "2024-09-27T09:51:33Z")

</div>

To clear out the compiled cache, only deleting the `.julia/compiled/v1.11` directory should be enough. No need to delete the entire `.julia` directory.

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [September 27, 2024, 10:13am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/20 "2024-09-27T10:13:53Z")

</div>

> [@Qfl3x](#):
>
> Julia takes a tad bit longer to start, and when I start typing, and when I press enter.

It’s probably better in the latest RC4. I got some fix in they might apply.

---

<div class="post-metadata">

### Author: ![Qfl3x](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qfl3x/32/16227_2.png) [@Qfl3x](https://discourse.julialang.org/u/Qfl3x)
#### Post date: [September 30, 2024, 8:30am UTC](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498/21 "2024-09-30T08:30:13Z")

</div>

So it seems that the performance problem disappeared after I deleted the cache. Even without specifying the target cpu it’s still good. No idea why that might be. Maybe I was using very packages compiled from rc2/rc1.

Is there a way to know which target cpu was detected by Julia?

[Next page](https://discourse.julialang.org/t/latency-with-v1-11-rc3-repl-over-ssh/119498.md?page=2)
