背景

工作学习要用 Ubuntu,打游戏要用 Windows,双系统的方案开关机不太方便,而且也不是很稳定,这一点在读研期间就尝试过。

听说 WSL2 可以在 Hyper-V 上直接运行 Linux(微软定制版 kernel),性能比 WSL1 有了很大提升。

所以本文要测试一下在 Windows 11 上的 WSL2 和原生 Windows 11 系统上进行深度学习训练的性能差异。

B 站视频中也查到了相关的测试,基本上是 WSL2 比 Windows 11 快很多,百分之25?

但本着求真务实的态度,还是自己测试一下。

Background

For work and study I need Ubuntu; for gaming I need Windows. The dual-boot approach is inconvenient to switch between and not very stable either — I tried that during grad school.

I heard that WSL2 can run Linux directly on Hyper-V (with Microsoft’s customized kernel), with a big performance boost over WSL1.

So this article tests the performance difference in deep learning training between WSL2 on Windows 11 and native Windows 11.

I also found related tests in Bilibili videos — basically WSL2 is much faster than Windows 11, 25%?

But in the spirit of seeking truth from facts, I decided to test it myself.

WikiPython科研

Opengrok 官方文档

https://github.com/oracle/opengrok/wiki/How-to-setup-OpenGrok

Opengrok 的官方文档是全英文的,本文将按照官方文档的教程进行最基础的部署。

OpenGrok Official Documentation

https://github.com/oracle/opengrok/wiki/How-to-setup-OpenGrok

OpenGrok’s official documentation is entirely in English; this article follows the official docs for the most basic deployment.

WikiLinux教程

每个程序员心中都有一个朴素的梦想:拥有一台属于自己的“好”电脑。工作两年后的这个 520,我终于如愿以偿,实现了这个小小的心愿。

本来计划是等到 618 再入手,但由于各个平台已经把 618 提前到了 513,而且都有 30 天保价政策,于是我果断下单。

那么,能否一次点亮呢?

Every programmer has a simple dream in mind: owning a “good” computer of their own. On this 520 (May 20th) after two years of working, I finally got my wish and fulfilled this small dream.

I originally planned to wait until the 618 (June 18th) shopping festival, but since various platforms had moved 618 up to 513 with a 30-day price protection policy, I placed the order without hesitation.

So, will it light up on the first try?

结绳记事

什么是 RCU

RCU (Read-Copy-Update) 是一种高效的同步机制,主要用于解决读多写少场景下的并发访问问题。它是 Linux 内核中广泛使用的同步技术,由 Paul McKenney 在 2001 年引入。RCU 允许多个读者无锁并发访问共享数据,同时写者可以并发修改数据,而不会导致数据不一致。

读者

内存状态

指向

通过ptr访问

通过ptr访问

数据对象 v1

全局指针 ptr

读者1

读者2

What is RCU

RCU (Read-Copy-Update) is an efficient synchronization mechanism primarily used to solve concurrency problems in read-heavy, write-light scenarios. It is a synchronization technique widely used in the Linux kernel, introduced by Paul McKenney in 2001. RCU allows multiple readers to access shared data concurrently without locks, while writers can modify the data concurrently without causing data inconsistency.

Readers

Memory State

points to

accesses via ptr

accesses via ptr

Data object v1

Global pointer ptr

Reader 1

Reader 2

C/C++WikiLinuxKernel

思绪回到 2024 年初

Thoughts Back to Early 2024

结绳记事

hexo-blog-encrypt 插件无法加密很多主题的文章目录,我使用的 hexo-theme-yun 也是如此。这篇文章记录了如何解决这个问题。

Demo:

The hexo-blog-encrypt plugin can’t encrypt the table of contents for many themes, and the hexo-theme-yun I use is no exception. This article documents how to solve this problem.

Demo:

阅读更多
Wiki教程GitHubJS