
Pengwin – A Linux Distro Optimized for WSL Based on Debian - edgr
https://github.com/WhitewaterFoundry/Pengwin
======
spmcbride1201
I'm a paying customer that's been running my main dev system on WSL and
Pengwin for four months now. I've got it on my ThinkPad and my beefy desktop
and sync the two environments using .dotfiles. There is a bit of an I/O
slowdown compared to native (most noticable when npm installing a billion tiny
modules), but generally everything is quite functional. No driver issues as
when I've run Linux. No terrible Mac keyboard. I run VSCode under WSL to keep
my dev toolchain on the Linux side. The main thing that forces me to dual boot
to Ubuntu is CUDA development, but I find that most of this sort of work has
shifted to Jupyter Notebook.

~~~
vesinisa
What's the main benefit of this distro over the standard Ubuntu usually
offered for WSL?

------
ncmncm
This is fundamentally the wrong direction to go.

The clue is that MSWin running in a VM on Linux is faster than on hardware.
The way forward is to boot Linux, or even something else, to manage hardware,
memory, and filesystems, and cut down MSWin to run in a container on it. That
way MSWin relies on the underlying OS to do things MSWin has proven to be just
not very good at. MSWin runs programs written for it, reliably the same as
non-hosted MSW, but is not subject to randomizing effects of manufacturers'
drivers and MS's historically poor buffer and process management.

If you want MSWin to manage the screen, it can provide a way for an underlying
OS program to work in a window it provides, and connect UI and clipboard
events back to it. But MSWin is not really so great at display management,
either, so it might be better for the underlying OS to manage that, too, as is
done with VMs on X today.

~~~
glitchc
I don’t believe your assertion. A quick check on the latest system-taxing
application (aka a game), confirms the exact opposite. Even a cross-platform
game, compiled natively for both OSes, runs faster on Windows in most cases.
How do you square these observations with your assertion.

~~~
gshulegaard
I assume you are limiting your definition of "system-taxing" to playing games
specifically?

As other people have noted, filesystem performance is often better under
Linux.

I also will point out that at least some rendering tasks can be faster under
Linux as well:

[http://blog.thepixelary.com/post/167616662857/improving-
perf...](http://blog.thepixelary.com/post/167616662857/improving-performance-
of-blenders-cycles)

Just like with the filesystem performance discrepancy, this article seems to
point out WDDM (Windows drivers) as the reason for this rendering discrepancy.

And while we are on gaming (since I am a gamer as well!) when comparing games
that run natively on Linux as well as Windows, Linux often has a performance
edge over Windows:

[https://www.phoronix.com/scan.php?page=news_item&px=Win10-Li...](https://www.phoronix.com/scan.php?page=news_item&px=Win10-Linux-
Vulkan-Early)

Of course most games do not support Linux natively so in order to game on
Linux you have to use WINE, Proton, or full virtualization to get a non-native
game to run and this extra middleware layer adds overhead. But this doesn't
mean gaming performance on Linux is worse than Windows; as comparing native-
to-native performance shows.

~~~
dbt00
Using git as a filesystem performance metric is horribly flawed -- git was
written from the beginning to perform perfectly on Linux. It's the most native
linux application I can think of.

(Not because it's using secret system calls, but because its design was vetted
and performance tailored for Linux.)

~~~
therealjumbo
I thought it was mainly because windows doesn't have a dir cache in the
kernel. The WSL filesystem performance thread is linked above which goes into
this.

And that can't be fixed without involving 10 different teams and potentially
outside partners.

And there's something wrong with the filesystem, which can't be fixed without
the same deal except that will definitely require the cooperation of the
outside partners because apparently you can write an extension for NTFS and
fixing it would break the existing extensions, which Microsoft doesn't have
the source for and doesn't ship.

And there's a thousand other paper cuts, and a very large fraction of those
would require cross-team coordination and testing, which is a horrible time
sink in a large company.

Fundamentally, Windows has poor performance when dealing with lots of little
files, which is exactly what compiling large code bases involves. And to top
it all off, their build system, conspires against their own OS. You'll get
better performance using cmake + ninja (on Windows that is) then you will with
cmake + visual studio.

Edit: also as a practical matter, if all my company's code is in git, and all
outside code bases I work with are in git, I kinda would like decent git
performance regardless of the origins of the tool.

I use windows as an outlook appliance at work, and as a gaming appliance at
home. Otherwise I do everything in linux and am much happier.

~~~
ncmncm
It is also extremely slow on big files. Try opening a file, seeking out to
10GB, and writing 4KB. Instant, on any Unix. Better have something else
planned for the afternoon, on Windows.

------
writepub
Can someone please enumerate how this is different from Ubuntu 18.04 (from
Canonical) on WSL? Other than distro differences, I see a LOT of marketing
speak in the Github ReadMe, but I can't tell if they really offer any
advantage over competing offerings.

~~~
pengwinhayden
On a technical level Ubuntu 18.04 is based on a mix of Debian stable and
testing with Canonical's additions.

Pengwin is primarily Debian testing, with some stable and some unstable here
and there.

Pengwin configures dozens of settings for WSL and has optional WSL-specific
features.

Settings are delivered by pengwin-base and features can be configured with
pengwin-setup.

You could probably spend hours implementing these features on your own each
time you have to install Ubuntu on a new Windows device.

But by purching Pengwin you support open source indie devs that handle it for
you, answer bug reports, constantly add new featres, and are available for
support.

~~~
mkl
What are these settings you keep referring to?

The readme is very vague about what Pengwin's features and differences
actually are, and gives me no solid reasons to switch from Ubuntu, which
already seems well-suited to WSL. Am I correct that trying Pengwin requires
paying and installing through the Microsoft Store, even though it's open
source?

------
acqq
Interesting:

“Grants/Bounties

If you have an idea for a new feature you would like to see implemented in
Pengwin and can implement it yourself given the funding, we are now accepting
grant/bounty proposals. Grants are currently available for $50-$500 USD based
on complexity.”

The upper limit is quite demotivating, from my point of view.

~~~
ghostly_s
Demotivating to whom? I imagine the intent is to avoid creating an impression
that anyone has the power to make their pet issue priority #1 for the dev team
just by throwing enough money at it.

~~~
acqq
But it's not for a "dev team" at all, the way I understood it, it's:

"Learn how you can earn paid grants improving Pengwin."

"Your proposal will be promptly evaluated" ... "Your work sample and GitHub
history will be evaluated to determine if you have the technical competancy to
implement the proposed change and deliver timely." "If approved, you will
recieve a simple agreement covering the scope of the work you will be doing
which you must acknowledge and return and then you may commence work."

~~~
pengwinhayden
You are correct. This is for contributors to get paid to add features they
want to see in the project. I wish we had more applications under the grant
program.

------
IronWolve
Is WSL multithreaded? I love the ease of use that WSL gives, but it seems slow
to cygwin on disk access. I think this is planned in a future fox by making
the WSL directory to the disk instead of in a container file. I went back to
cygwin for faster speed of scripts processing files.

~~~
davb
I noticed file IO was slow too. My solution is to do most of my work in
headless Linux VMs, using WSL as the interface to manage and connect to those
VMs. This way I get the bash shell and ssh client I love but get isolated
environments for my projects/clients. I run samba on the Linux VMs, with
mapped drives on the Windows host so that I can edit files using VS Code.
Outwardly it might look a little convoluted but I get isolation, performance,
convinience and an ultra smooth host OS experience.

I say this coming from around a decade of running Linux or MacOS on the
desktop. This just works.

~~~
h1d
What do you use as your VM software? I take it VMWare has a pretty decent IO
performance to host's files through HGFS when VirtualBox isn't as performing.

~~~
davb
I'm actually using Virtualbox. In my case, the guest doesn't see the host's
files - it's the other way around. 80% of the file operations happen within
the VM, with the rest being in VS Code on the host (via a mapped drive
pointing to the a samba share on the guest). This lets me preserve file
permissions and allows me to backup or migrate my entire project by just
copying the VM disk images. It also gives me all the performance I need (and
with a ton of ram, my database workload rarely hits the disk, which is a fast
nvme ssd anyway).

I'm not running a Windows Insider build, and the current version of WSL
doesn't accurately represent the posix permissions on files seen via the
/mnt/c mount (DrvFs). The next version resolves this by storing posix
permissions and other meta data. In my case, being unable to manipulate the
permissions causes us some problems. It makes a lot of sense to work on the
files within the VM, in a native ext4 volume.

------
kevin_b_er
I tried looking around but didn't see anything about it.

What makes this optimized for WSL?

~~~
pengwinhayden
We alter dozens of settings to defaults that make sense for the WSL
environment. Unlike the other distributions available for WSL, Pengwin is
designed for WSL first.

~~~
h1d
Any examples of the optimizations?

------
wsargent
Started using this yesterday, with the X410 X11 install.

The nicest thing has to be running IntelliJ from X11 and have it see the linux
filesystem.

I can run a Yubikey with weasel-pageant and get GPG signing and SSH keychain
access to github through it -- it pops up a Windows PIN entry dialog box and
then works fine thereafter. You can use wslutilities (wslusc) to set up
windows shortcuts to your Linux applications. I use ConEmu as my shell and
it's fine.

There is a problem with HiDPI screens. I've worked around this by increasing
the font size in IntelliJ, but VS Code shows up as teensy tiny.

The worst part has to be the documentation. The docs for "pengwin-setup" is
basically a bunch of screenshots on their blog.

------
whalesalad
the name is very clever.

~~~
crusso
My thought too. No matter what the implementation or ideas behind it... that's
a killer name.

~~~
penagwin
Hahaha such a great name yeah!

~~~
pengwinhayden
The name and logo were developed in consultantion with Dennis Bednarz.
[https://twitter.com/DennisBednarz](https://twitter.com/DennisBednarz)

------
yellowapple
Is this actually a _Linux_ distro, though? I've long held that "WSL" is a
misnomer; it happens to be compatible with binaries compiled for Linux, but
given that no Linux code is actually present, this would really be Debian
GNU/NT.

~~~
xfer
What? WSL emulates linux syscalls and vfs, how is this a misnomer?

~~~
yellowapple
It's a misnomer because it's not actually Linux (nor does it even wrap/include
Linux in any way), just like how Wine isn't actually Windows (if it _was_
Linux, then Microsoft is blatantly violating the GPL). Most charitably, it's
less "Windows Subsystem for Linux" and more "Windows Subsystem for Programs
Compiled for Linux".

------
xmichael999
I'm so confused right now. I looked at the various links and cant believe I
still can't figure this out. The kernel is windows or linux? How do I get or
run this? I install windows and then this? Someone help me out here!

~~~
jamesgeck0
WSL is a Windows 10 feature that allows you to run Linux applications on the
NT kernel. It's not a 100% complete implementation of every Linux kernel API
(yet?) but it's far enough along that you can run a lot of interesting
software.

[https://www.hanselman.com/blog/TheYearOfLinuxOnTheWindowsDes...](https://www.hanselman.com/blog/TheYearOfLinuxOnTheWindowsDesktopWSLTipsAndTricks.aspx)

Pengwin looks like a Linux distro that removes the parts of a traditional
distro that don't make sense in WSL and streamlines things that are still
somewhat difficult in WSL, like getting X applications running.

~~~
h1d
I get it that WSL is easy for anyone to use but why not just run a real Linux
in VMware or VirtualBox and you'll have 100% compatible Linux environment.

Prebuilt OS image is just a single download and deploy.

~~~
jamesgeck0
Because I don't need a 100% compatible environment. WSL has better host
integration and better performance in my experience, and it runs my
development stack fine.

~~~
GordonS
Was going to say much the same thing, plus it starts instantaneously, vs a
minimum of several seconds for a VM

------
i_can_c_sharp
I guess the “extend” phase is about to begin.

------
penagwin
Oh boy, similar name to me haha! ;)

