34

I'm using WSL2 with Ubuntu on Windows 11 and there is a weird process called plan9 I see with htop.

Here is a picture of it.

Screenshot.

ps ax output:

4 ?        Sl     0:00 plan9 --control-socket 5 --log-level 4 --server-fd 6 --log-truncate

Can anyone explain what that is? I found nothing on the internet about that.

Giacomo1968
  • 58,727
Zekel7
  • 361

2 Answers2

12

It's a really good question -- I hadn't noticed this yet, but I hadn't upgraded WSL in a few days. This is a very recent change (last week) in the latest WSL releases.

As mentioned in the comments, WSL uses the 9P protocol to share files between Windows and WSL. However, this process only appears starting in WSL 0.70.4. Although there is nothing mentioned about it in the 0.70.4 release notes, the 0.70.5 notes mention fixing a race condition in (what is likely) this component.

It's definitely injected by WSL itself, so nothing to worry about, but it would be nice to know what the purpose is, since it is new. Several theories that I can think of:

  • This is related to the recent Systemd changes in WSL.
  • This change fixed a WSL issue -- Although I don't see any 9P issues that were recently closed in the WSL GitHub repo.
  • This change might be designed to give the WSL team more control over changes to the 9P component, where previous releases might have been tied to Windows components/functionality.
  • This change (hopefully!) will allow the WSL team to improve the performance of 9P when accessing Windows files through WSL2. The extremely poor performance has been one of the few reasons to use WSL1 over WSL2 (when that feature is needed). I tested this under 0.70.5, and this change definitely doesn't improve performance, but maybe it sets the stage for a future update where that will happen.

But, until someone from Microsoft tells us more, these are just theories.

NotTheDr01ds
  • 28,025
6

this is in fact taken form the plan 9 OS which was developed at Bell labs to replace Unix "9P is a generic, medium-agnostic, byte-oriented protocol that provides for messages delivered between a server and a client"

plan9

rj reilly
  • 87
  • 1
  • 2