-
We tried to benchmark simple
The same code from above, was run on the same laptop (hardware), whereat Ubuntu 20.04 was a WSL installation and WIN 10 is the default laptop OS, hence it doesn't make sense to provide hardware specs. In both tests, these were running on the same hardware. First of all, an awesome performance was achieved on Linux (Ubuntu 20.04):
Compared to running it on Windows 10:
I wonder why is Win 10 so sluggish and offers such a huge degradation in Is it NodeJs on WIN thing? Is there anything it can be done, to improve the results on Win 10? My assumption is because Unfortunately, since are not able to install Any suggestion to prove our assumption wrong or correct, and if there is anything we can do to reach the benchmark results similar to those on Ubuntu? Or we just need to accept, that Win 10 sucks 😄 and there is nothing we can do about it? Your input is highly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Windows 10 doesn't suck (in this context), but doing benchmarks with WSL2 is most probably very wrong. Not only is WSL2 virtualized, it also has virtualized NICs and all kinds of crap attached to it - especially between Windows world and Linux world (from what I understand, I an no expert in WSL2 so I can be wrong). |
Beta Was this translation helpful? Give feedback.
-
A rule of thumb can be to assume Linux to be the production platform and Windows to be second-class platform. It doesn't have to be like this, but that's a good rule of thumb since we really only benchmark on Linux (and sometimes on macOS or FreeBSD). |
Beta Was this translation helpful? Give feedback.
-
It's not a dev on WSL, but a Win 10 dev.
Unfortunately, the client of ours, has an app as well as infrastructure,
heavily bound with Windows and Microsoft related products (mssql
replication, sso etc etc), so we were evaluating swapping their current
dotnet + signalR solution by uWebSockets.js.
In order to run benchmarking we only installed wrk via WSL2 and that's how
we noticed this perf degradation.
So then goal is to use uws on Win10 and still show the client the nice
benchmark results uws provides on linux.
But is seems that its not a proper way to run wrk from WSL against uws
running on win10.
…On Wed, Apr 21, 2021, 18:46 hst-m ***@***.***> wrote:
you should not be developing on WSL you should be running full virtual
machines like virtualbox etc to fully simulate a production environment,
otherwise you get issues like this guy #467
<#467>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#515 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARGUS6UCG6ARNPWPSCMLBLTJ3XMJANCNFSM43KSF2DA>
.
|
Beta Was this translation helpful? Give feedback.
-
You can also just look at CPU-time utilization at whatever number and extrapolate linearly from that. I get like 4% CPU-time utilization on Windows over Wifi at like 30k req/sec so similarly you can scale it linearly as a guesstimate. |
Beta Was this translation helpful? Give feedback.
-
Hoping this is the right place to post this, for those that using WSL to dev be warned you'll only ever get Here's a small example I tried on WSL. Running it on windows/linux, etc. no issues. Going to take a guess something to do with the virtual nic WSL uses. const uWS = require('uWebSockets.js');
const port = 9001;
uWS.App().get('/', (res, req) => {
res.end(JSON.stringify({
getRemoteAddress: Buffer.from(res.getRemoteAddress()).toString(),
getRemoteAddressAsText: Buffer.from(res.getRemoteAddressAsText()).toString(),
getProxiedRemoteAddress: Buffer.from(res.getProxiedRemoteAddress()).toString(),
getProxiedRemoteAddressAsText: Buffer.from(res.getProxiedRemoteAddressAsText()).toString()
}));
}).listen(port, (token) => {
if (token) {
console.log('Listening to port ' + port);
} else {
console.log('Failed to listen to port ' + port);
}
}); |
Beta Was this translation helpful? Give feedback.
Windows 10 doesn't suck (in this context), but doing benchmarks with WSL2 is most probably very wrong. Not only is WSL2 virtualized, it also has virtualized NICs and all kinds of crap attached to it - especially between Windows world and Linux world (from what I understand, I an no expert in WSL2 so I can be wrong).