Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting from GitHub Actions run 73 #9

Merged
merged 3 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/advanced/cuda.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ CUDA(Compute Unified Device Architecture)是由 NVIDIA 公司推出的开发

- NCCL:多 GPU 和多节点上的集合通信的库。

- Thrust:类似于 C++标准模板库(`STL`)的并行算法库。
- Thrust:类似于 C++ 标准模板库(`STL`)的并行算法库。

- CUDA Samples: 示例代码,涵盖了基本的`Hello World`程序到更复杂的应用程序。
- CUDA Samples:示例代码,涵盖了基本的`Hello World`程序到更复杂的应用程序。

- NVIDIA Nsight Tools: 集成开发环境和调试工具,用于帮助开发者优化 CUDA 应用程序的性能和可靠性。包括 `Nsight Eclipse Edition`、`Nsight Visual Studio Edition`、`Nsight Compute` 和 `Nsight Systems`。
- NVIDIA Nsight Tools:集成开发环境和调试工具,用于帮助开发者优化 CUDA 应用程序的性能和可靠性。包括 `Nsight Eclipse Edition`、`Nsight Visual Studio Edition`、`Nsight Compute` 和 `Nsight Systems`。

- CUDA Documentation:包括 API 参考、编程指南、最佳实践指南和其他技术资源等

## 配置 CUDA 环境

### 硬件准备

在开始之前,你需要确认显卡是否支持支持 CUDA 。在这里可以查看支持的列表:<https://developer.nvidia.com/CUDA-gpus>
在开始之前,你需要确认显卡是否支持支持 CUDA。在这里可以查看支持的列表:<https://developer.nvidia.com/CUDA-gpus>

表中的`Compute Capability`代表计算能力,同时也表明了 GPU 支持的 CUDA 特性和指令集版本。

Expand Down
18 changes: 9 additions & 9 deletions docs/ops/storage/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

可以使用 `lsblk` 命令查看系统中的块设备。一个桌面系统的例子如下:

```console
```text
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 1.9T 0 disk
├─nvme0n1p1 259:1 0 260M 0 part
Expand Down Expand Up @@ -192,8 +192,8 @@ MBR 信息存储在磁盘的第一个扇区[^sector](512 字节[^sector-size]

首先创建一个空文件:

```console
$ truncate -s 8G test.img
```shell
truncate -s 8G test.img
```

!!! info "稀疏文件"
Expand All @@ -209,10 +209,10 @@ $ truncate -s 8G test.img

之后我们就可以直接操作这个文件,而不用担心破坏真实的磁盘。

```console
$ fdisk test.img
$ # 或者
$ parted test.img
```shell
fdisk test.img
# 或者
parted test.img
```

以下的例子会创建一个 256M 的 EFI 分区,一个 1G 的 swap 分区,剩下的空间作为根文件系统的分区。
Expand Down Expand Up @@ -405,8 +405,8 @@ ext4 最常见的问题之一是 inode 的数量限制。
除此之外,ext4 默认的 5% 保留空间也是常会遇到的问题。这一部分保留空间仅允许 root 用户使用,以在磁盘空间不足时仍保证 root 权限的进程能够正常运行。
但是对于现代的大容量磁盘来说,这一部分空间可能会浪费很多。可以使用 `tune2fs` 命令调整这一参数:

```console
$ sudo tune2fs -m 1 /dev/sda1 # 将保留空间调整为 1%
```shell
sudo tune2fs -m 1 /dev/sda1 # 将保留空间调整为 1%
```

### Btrfs
Expand Down
4 changes: 2 additions & 2 deletions docs/ops/virtualization/qemu-kvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

### KVM

KVM(Kernel-based Virtual Machine)是一种基于Linux内核的开源虚拟化解决方案。KVM将Linux转变成一个虚拟机监视器(Hypervisor)。它利用了现代处理器中的硬件虚拟化支持(例如Intel VT或AMD-V),以实现高性能的虚拟化。它专注于以最小的开销在Linux上提供安全和隔离的虚拟环境,同时维持接近原生的性能。它向用户空间提供了虚拟 CPU 和内存子系统的配置和执行控制相关接口,但 KVM 不包含硬件模型,不能独立构成虚拟机。
KVM(Kernel-based Virtual Machine)是一种基于 Linux 内核的开源虚拟化解决方案。KVM 将 Linux 转变成一个虚拟机监视器(Hypervisor)。它利用了现代处理器中的硬件虚拟化支持(例如 Intel VT-x 或 AMD-V),以实现高性能的虚拟化。它专注于以最小的开销在 Linux 上提供安全和隔离的虚拟环境,同时维持接近原生的性能。它向用户空间提供了虚拟 CPU 和内存子系统的配置和执行控制相关接口,但 KVM 不包含硬件模型,不能独立构成虚拟机。

### QEMU/KVM

Check failure on line 21 in docs/ops/virtualization/qemu-kvm.md

View workflow job for this annotation

GitHub Actions / build

Multiple headings with the same content

docs/ops/virtualization/qemu-kvm.md:21 MD024/no-duplicate-heading Multiple headings with the same content [Context: "### QEMU/KVM"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md024.md

Check failure on line 21 in docs/ops/virtualization/qemu-kvm.md

View workflow job for this annotation

GitHub Actions / build

Multiple headings with the same content

docs/ops/virtualization/qemu-kvm.md:21 MD024/no-duplicate-heading Multiple headings with the same content [Context: "### QEMU/KVM"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md024.md

Check failure on line 21 in docs/ops/virtualization/qemu-kvm.md

View workflow job for this annotation

GitHub Actions / build

Multiple headings with the same content

docs/ops/virtualization/qemu-kvm.md:21 MD024/no-duplicate-heading Multiple headings with the same content [Context: "### QEMU/KVM"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md024.md

Check failure on line 21 in docs/ops/virtualization/qemu-kvm.md

View workflow job for this annotation

GitHub Actions / build

Multiple headings with the same content

docs/ops/virtualization/qemu-kvm.md:21 MD024/no-duplicate-heading Multiple headings with the same content [Context: "### QEMU/KVM"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md024.md

QEMU 与 KVM 的关系是互补的。当二者结合使用时,QEMU 负责提供软件模拟和用户界面,而 KVM 则在内核级别提供硬件加速支持。这种配合使得虚拟机能够以较低的性能开销运行,同时用户还可以享受到 QEMU 在设备模拟方面提供的灵活性。实际上,QEMU 通常作为用户空间的工具与 KVM 的内核虚拟化功能配合,一起形成了现代 Linux 环境中强大的虚拟化解决方案。

Expand Down Expand Up @@ -80,7 +80,7 @@
QEMU 支持多种存储格式,每种格式都有其特定的优点和用途。以下是一些最常见的 QEMU 磁盘镜像格式:

1. raw: 这是最简单的磁盘镜像格式。它是未经过任何处理的磁盘镜像,没有任何元数据或附加特性。因为其简单性,它通常有最好的性能,并且可以直接被许多其他工具读取,比如 dd。如果主机文件系统支持稀疏文件,那么 raw 格式的磁盘镜像文件可以非常小,因为它只会在需要时才增长到所需大小。如果主机文件系统支持 hole-punching 操作,那么 raw 格式的磁盘镜像文件可以直接释放未使用的空间。
2. qcow2 (QEMU Copy-On-Write version 2): 这是QEMU最常用的磁盘镜像格式。它支持许多高级特性,如写时复制 (copy-on-write),快照,压缩,加密和增量备份。
2. qcow2 (QEMU Copy-On-Write version 2): 这是 QEMU 最常用的磁盘镜像格式。它支持许多高级特性,如写时复制 (copy-on-write),快照,压缩,加密和增量备份。

此外 QEMU 还支持许多其他磁盘格式,如 vmdk, vdi, vhdx 等。由于这些格式不是很常见,这里不再详细介绍。

Expand Down
Loading