Linux 性能调优之虚拟化(Virtualization tuned)调优

2024-02-06 05:52

本文主要是介绍Linux 性能调优之虚拟化(Virtualization tuned)调优,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

写在前面


  • 考试整理相关笔记
  • 博文内容涉及Linux 虚拟化常见管理操作以及部分调优配置
  • 理解不足小伙伴帮忙指正

不必太纠结于当下,也不必太忧虑未来,当你经历过一些事情的时候,眼前的风景已经和从前不一样了。——村上春树


使用工具进行调优

可以直接使用 tuned 包里面的适用于虚拟化调优的参数,tuned 中对于虚拟化通过两个优化配置,一个适用虚拟机,一个适用虚拟机所在的宿主机。

- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
  • virtual-guest:为运行在虚拟机客户机中进行优化,即虚拟机模式
  • virtual-host:为运行 KVM 客户机进行优化,运行了虚拟机的宿主机

看一下这个两个策略配置做了什么操作

虚拟机客户机策略,可以看到当前策略继承了下面的策略:

  • throughput-performance:最大吞吐量,提供磁盘和网络 IO 的吞吐量
┌──[root@liruilongs.github.io]-[~]
└─$cat /usr/lib/tuned/virtual-guest/tuned.conf
#
# tuned configuration
#[main]
summary=Optimize for running inside a virtual guest
include=throughput-performance[sysctl]
# If a workload mostly uses anonymous memory and it hits this limit, the entire
# working set is buffered for I/O, and any more write buffering would require
# swapping, so it's time to throttle writes until I/O can catch up.  Workloads
# that mostly use file mappings may be able to use even higher values.
#
# The generator of dirty data starts writeback at this percentage (system default
# is 20%)
vm.dirty_ratio = 30# Filesystem I/O is usually much more efficient than swapping, so try to keep
# swapping low.  It's usually safe to go even lower than this on systems with
# server-grade storage.
vm.swappiness = 30

修改了两个内核参数

vm.dirty_ratio = 30
vm.swappiness = 30

vm.dirty_ratio:这个参数指定了当匿名内存(anonymous memory)的脏页(dirty pages)达到一定比例时,开始进行写回(writeback)。脏页是指已经被修改但尚未写入磁盘的页面。默认值是20%,而在这个配置中设置为30%。当脏页达到这个比例时,系统会开始将这些数据写回磁盘,以便为后续的写入操作腾出空间。这个参数的增加可以延迟写回的触发,帮助提高I/O性能

vm.swappiness:这个参数控制系统在内存紧张时进行页面置换(swapping)的倾向程度。页面置换指的是将内存中的页面数据移出到交换空间(swap space)中,以便为其他进程或文件提供更多的内存空间。默认值是60,而在这个配置中设置为30。较低的值表示系统更倾向于使用文件系统的I/O操作来释放内存,而不是频繁进行页面置换。这对于使用高性能存储的服务器系统来说是安全的,可以降低页面置换的频率,提高整体性能。

虚拟机的宿主机策略,通过继承了 throughput-performance 最大吞吐量策略

┌──[root@liruilongs.github.io]-[~]
└─$cat /usr/lib/tuned/virtual-host/tuned.conf
#
# tuned configuration
#[main]
summary=Optimize for running KVM guests
include=throughput-performance[sysctl]
# Start background writeback (via writeback threads) at this percentage (system
# default is 10%)
vm.dirty_background_ratio = 5[cpu]
# Setting C3 state sleep mode/power savings
force_latency=cstate.id_no_zero:3|70
┌──[root@liruilongs.github.io]-[~]
└─$
  • vm.dirty_background_ratio:这个参数指定了当脏页的比例达到一定阈值时,系统开始后台写回(writeback)。脏页是指已经被修改但尚未写入磁盘的页面。默认值是10%,而在这个配置中设置为5%。当脏页达到这个比例时,系统会启动后台的写回线程,将部分数据写回磁盘,以减少内存中的脏页数量。通过降低这个阈值,可以在系统负载较轻时更早地开始后台写回,以提高整体的I/O性能。

  • [cpu] 部分中的 force_latency:这个配置参数用于设置CPU的C3状态(sleep mode)的睡眠模式或省电模式。C3状态是一种较深的睡眠状态,可以在CPU空闲时进入以节省能源。这里的配置 cstate.id_no_zero:3|70 指示系统在空闲时将CPU进入C3状态,以实现一定程度的省电。具体的值和配置方式可能因硬件和内核版本而有所不同,这里的示例是针对特定的设置。

vm.dirty_background_ratio 参数和 vm.dirty_ratio 参数的区别:

  • vm.dirty_background_ratio 用通俗的话讲,可以驻留在内存中最大占比,即这些数据要写到磁盘,但是这个这个阈值之内不会发生回写。

  • vm.dirty_ratio 用通俗的话讲,当前系统能允许的最大脏页占比。当系统到达这一点时,所有新的 I/O 都会阻塞,直到脏页已写入磁盘

资源占用信息查看

┌──[root@liruilongs.github.io]-[~]
└─$yum -y install numactl

numactl 是一个用于在 NUMA(非统一内存访问)系统上运行程序的实用工具。它可以帮助您管理和优化在 NUMA 架构下的内存访问和处理器分配。

NUMA(Non-Uniform Memory Access)是一种计算机系统架构,用于处理多处理器系统中的内存访问和内存管理。在NUMA架构中,系统中的内存被划分为多个节点(Node),每个节点与一个或多个处理器核心(CPU)相关联

每个NUMA节点包含一部分物理内存和与之关联的处理器核心。节点之间通过高速互连(如快速路径互连或片上互连)连接起来,以实现节点之间的通信和数据传输

使用numastat命令获取的关于qemu-kvm进程在不同NUMA节点上的内存使用情况的输出结果。

┌──[root@liruilongs.github.io]-[~]
└─$numastat -c qemu-kvmPer-node process memory usage (in MBs)
PID              Node 0 Total
---------------  ------ -----
1755 (qemu-kvm)     855   855
53693 (qemu-kvm)    759   759
53790 (qemu-kvm)   1218  1218
53890 (qemu-kvm)    875   875
54009 (qemu-kvm)    751   751
54128 (qemu-kvm)    811   811
54246 (qemu-kvm)    778   778
---------------  ------ -----
Total              6048  6048

设置虚拟机CPU绑定

使用 virsh 工具对虚拟机的虚拟CPU(VCPU)进行查看绑定操作

┌──[root@liruilongs.github.io]-[~]
└─$virsh vcpupin workstation
VCPU: CPU Affinity
----------------------------------0: 0-71: 0-7

指定了名为"workstation"的虚拟机的VCPU绑定情况。根据输出,该虚拟机有两个VCPU(标识符为0和1),并且它们都与CPU编号0到7之间的CPU核心有绑定关系。

┌──[root@liruilongs.github.io]-[~]
└─$virsh vcpupin servera
VCPU: CPU Affinity
----------------------------------0: 0-71: 0-7

对名为"serverc"的虚拟机的第一个VCPU(标识符为0)进行了更具体的绑定设置。它将该VCPU绑定到了CPU编号为0的核心上。

┌──[root@liruilongs.github.io]-[~]
└─$virsh vcpupin serverc 0 0
┌──[root@liruilongs.github.io]-[~]
└─$virsh vcpupin serverc
VCPU: CPU Affinity
----------------------------------0: 01: 0-7

0-5 表示将该 VCPU 绑定到 CPU 编号为 0到5的核心上。这意味着虚拟机的第一个VCPU只能在这些CPU核心上执行。

┌──[root@liruilongs.github.io]-[~]
└─$virsh vcpupin serverc 0 0-5┌──[root@liruilongs.github.io]-[~]
└─$virsh vcpupin serverc
VCPU: CPU Affinity
----------------------------------0: 0-51: 0-7

查看某个虚拟机的内存信息

┌──[root@liruilongs.github.io]-[~]
└─$virsh  dominfo workstation
Id:             3
Name:           workstation
UUID:           3f09a13c-94ad-4d97-8f76-17e9a81ae61f
OS Type:        hvm
State:          running
CPU(s):         2
CPU time:       771.0s
Max memory:     2097152 KiB #虚拟机可用的最大内存容量,以KiB(Kibibyte)为单位。
Used memory:    2097152 KiB #虚拟机当前使用的内存容量,以KiB为单位。
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: selinux
Security DOI:   0
Security label: system_u:system_r:svirt_t:s0:c201,c330 (enforcing)

限制虚拟机的 CPU 资源

限制虚拟机的 CPU 资源, cpu shares=2048 的虚拟机会比cpu shares=1024 的虚拟机获得更多的 CPU 资源

┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$virsh schedinfo workstation
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1
global_period  : 100000
global_quota   : -1
iothread_period: 100000
iothread_quota : -1┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$virsh schedinfo workstation cpu_shares=2048
Scheduler      : posix
cpu_shares     : 2048
vcpu_period    : 100000
vcpu_quota     : -1
emulator_period: 100000
emulator_quota : -1
global_period  : 100000
global_quota   : -1
iothread_period: 100000
iothread_quota : -1

虚拟机CPU份额(cpu shares)参数的值为2048。CPU份额用于确定虚拟机在竞争CPU资源时的优先级。较高的份额值表示虚拟机将获得更多的CPU时间片。

设置虚拟机内存限制

设置 control 虚拟机的最大内存容量(确保虚拟机关机状态设置

┌──[root@liruilongs.github.io]-[~]
└─$virsh setmaxmem workstation --size 2097152
error: Unable to change MaxMemorySize
error: Requested operation is not valid: cannot resize the maximum memory on an active domain

设置 control 虚拟机的运行内存容量(确保虚拟机开机状态设置)

┌──[root@liruilongs.github.io]-[~]
└─$virsh setmem workstation --size 2097152

查看虚拟机内存限制

┌──[root@liruilongs.github.io]-[~]
└─$virsh memtune workstation
hard_limit     : unlimited
soft_limit     : unlimited
swap_hard_limit: unlimited

设置虚拟机内存限制

┌──[root@liruilongs.github.io]-[~]
└─$virsh memtune workstation  --hard-limit 2G --soft-limit 1G
┌──[root@liruilongs.github.io]-[~]
└─$virsh memtune workstation
hard_limit     : 2097152
soft_limit     : 1048576
swap_hard_limit: unlimited┌──[root@liruilongs.github.io]-[~]
└─$

KSM 参数配置

多个虚拟机运行相同的操作系统或者工作负载时,许多内存也很可能具有相同的内容,对这些相同内存内存页进行合并称为内核共享内存(KSM)

当需要写入并修改共享内存时,KSM 会克隆共享页面,给虚拟机一个非共享的副本,这个过程称为写时复制(COW,copy on write)

ksm 进程: 执行内存扫描和内存页合并

┌──[root@liruilongs.github.io]-[~]
└─$systemctl status ksm
ksm.service       ksmtuned.service
┌──[root@liruilongs.github.io]-[~]
└─$systemctl status ksm.service
● ksm.service - Kernel Samepage MergingLoaded: loaded (/usr/lib/systemd/system/ksm.service; enabled; vendor preset: enabled)Active: active (exited) since Mon 2023-10-02 19:31:31 CST; 2 days agoMain PID: 997 (code=exited, status=0/SUCCESS)Tasks: 0 (limit: 253184)Memory: 0BCGroup: /system.slice/ksm.serviceOct 02 19:31:30 liruilongs.github.io systemd[1]: Starting Kernel Samepage Merging...
Oct 02 19:31:31 liruilongs.github.io systemd[1]: Started Kernel Samepage Merging.

ksmtuned 进程:控制何时扫描以及扫描的积极性

┌──[root@liruilongs.github.io]-[~]
└─$systemctl status ksmtuned.service
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning DaemonLoaded: loaded (/usr/lib/systemd/system/ksmtuned.service; enabled; vendor preset: enabled)Active: active (running) since Mon 2023-10-02 19:31:36 CST; 2 days agoMain PID: 1036 (ksmtuned)Tasks: 2 (limit: 253184)Memory: 12.9MCGroup: /system.slice/ksmtuned.service├─ 1036 /bin/bash /usr/sbin/ksmtuned└─62516 sleep 60Oct 02 19:31:31 liruilongs.github.io systemd[1]: Starting Kernel Samepage Merging (KSM) Tuning Daemon...
Oct 02 19:31:36 liruilongs.github.io systemd[1]: Started Kernel Samepage Merging (KSM) Tuning Daemon.
┌──[root@liruilongs.github.io]-[~]
└─$

可以通过/sys/kerel/mm/ksm/目录下的参数,设置调优参数:

┌──[root@liruilongs.github.io]-[~]
└─$cat /sys/kernel/mm/ksm/
full_scans                          pages_to_scan                       stable_node_chains
max_page_sharing                    pages_unshared                      stable_node_chains_prune_millisecs
merge_across_nodes                  pages_volatile                      stable_node_dups
pages_shared                        run                                 use_zero_pages
pages_sharing                       sleep_millisecs
┌──[root@liruilongs.github.io]-[~]
└─$cat /sys/kernel/mm/ksm/run
0
┌──[root@liruilongs.github.io]-[~]
└─$
  • run:设置为 1 时,ksm 进程主动扫描内存,设置为 0 时,扫描被禁用。(默认为 0)
  • pages to scan:下一个周期要扫描的内存页数。(默认 100)sleep_millisecs:周期之间睡眠的时间,单位为毫秒。 (默认 20)
  • pages shared:共享总页数。 (默认 0)
  • pages_sharing:当前共享的页数。 (默认 0)
  • fullscans:扫描整个内存空间的次数。 (默认 0)
  • merge acrossnodes:是否合并不同 NUMA 节点的内存。(默认 1)

可以通过 virsh node-memory-tune 命令查看这些参数的值,或者修改这些参数文件的值.

nodecpustats      nodedev-destroy   nodedev-dumpxml   nodedev-list      nodedev-reset     node-memory-tune  nodesuspend
┌──[root@liruilongs.github.io]-[~]
└─$virsh node-memory-tune
Shared memory:shm_pages_to_scan 100shm_sleep_millisecs 20shm_pages_shared 2013shm_pages_sharing 5130shm_pages_unshared 10144shm_pages_volatile 91431shm_full_scans  28shm_merge_across_nodes 1┌──[root@liruilongs.github.io]-[~]
└─$virsh node-memory-tune --shm-sleep-millisecs 30┌──[root@liruilongs.github.io]-[~]
└─$virsh node-memory-tune
Shared memory:shm_pages_to_scan 100shm_sleep_millisecs 30shm_pages_shared 2013shm_pages_sharing 5130shm_pages_unshared 10144shm_pages_volatile 91431shm_full_scans  28shm_merge_across_nodes 1┌──[root@liruilongs.github.io]-[~]
└─$cat /sys/kernel/mm/ksm/sleep_millisecs
30
┌──[root@liruilongs.github.io]-[~]
└─$

虚拟磁盘配置调优

虚拟机使用的磁盘可以是一个块设备,也可以是一个镜像文件

直接使用块设备是一个不错的选择,而使用镜像文件则会带来额外的 I/O 资源需求,镜像文件需要更多的 I/0 资源, KVM 支持 2 种镜像格式:

  • raw
  • qcow2

raw 格式性能比 qcow2 更好,但是 qcow2 可以获得更多功能。qcow2 可以提供如下功能:

  • sparse image file (稀疏镜像文件或精简像文件,真正使用时才分配存储空间)
  • Cow(写时复制)
  • ROW (写时重定向),应用于快照
  • compression(支持压缩)
  • encryption(支持加密)
创建 qcow2 镜像

使用 gemu-img create 命令可以创建 qcow2 镜像文件:

┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$qemu-img create -f qcow2 -o preallocation=metadata /var/lib/libvirt/images/disk.qcow2 1G
Formatting '/var/lib/libvirt/images/disk.qcow2', fmt=qcow2 size=1073741824 cluster_size=65536 preallocation=metadata lazy_refcounts=off refcount_bits=16
┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$ll /var/lib/libvirt/images/disk.qcow2
-rw-r--r--. 1 root root 1074135040 Oct  5 14:17 /var/lib/libvirt/images/disk.qcow2
┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$

preallocation 支持的选择:

  • preallocation=off,不分配任何空间,off 为默认属性
  • preallocation=metadata,提前创建 metadata 空间,但不分配实际数据存储空间,快速创建镜像,但是写入速度会变慢。
  • preallocation=falloc,创建 metadata 空间和数据空间,但是标记 block 为未分配,创建镜像比 metadata 慢,但是写入速度更快
  • preallocation=full,创建镜像时分配所有资源,不使用 spare 技术。初始化镜像慢,性能类似 falloc。
创建快照盘(ROW)

基于 disk.qcow2 镜像文件,创建新的快照文件 disk-snap.qcow2,新像 30G

┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$qemu-img create -f qcow2 -b /var/lib/libvirt/images/disk.qcow2 disk-snap.qcow2 30G
Formatting 'disk-snap.qcow2', fmt=qcow2 size=32212254720 backing_file=/var/lib/libvirt/images/disk.qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16
┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$ll /var/lib/libvirt/images/disk-snap.qcow2
-rw-r--r--. 1 root root 197088 Oct  5 14:25 /var/lib/libvirt/images/disk-snap.qcow2
┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$
虚拟机磁盘缓存模式
  • cache=none,不开启缓存,直接数据落盘,支持虚拟机迁移
  • cache=writethrough,数据同时写入缓存和物理硬盘,该选项确保数据完整性,但是写速度慢
  • cache=writeback,数据先写缓存,写入缓存及确认数据写入完成,然后缓存同步落盘
  • cache=directsync,类似 writethrouth,数据写入物理硬盘,需要的时候绕过缓存
  • cache=unsafe,类似于 writeback,但是所有 /O flush 都会被忽略,不确保数据安全,但是可以提升性能,比如在安装系统时使用该模式,但是不能应用在生产工作负载
┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$cat *.xml  | grep driver<driver name="qemu" type="qcow2" cache='none'/>

虚拟机磁盘 IO 调优

使用virsh blkdeviotune命令来为名为"workstation"的虚拟机的磁盘设备(vda)设置了I/O限制。具体来说,设置了每秒最大IOPS(IO操作每秒)为1000,并设置了每秒最大字节传输速率为10MB。

┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$virsh  blkdeviotune workstation  vda --total-iops-sec 1000 --total-bytes-sec 10MB┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$virsh dumpxml workstation | grep -A2 iotune<iotune><total_bytes_sec>10000000</total_bytes_sec><total_iops_sec>1000</total_iops_sec></iotune><alias name='virtio-disk0'/><address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$

虚拟化性能监控

查看设备 IO 信息

┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$virsh  domblkstat workstation vda --human
Device: vdanumber of read operations:      15012number of bytes read:           437122048number of write operations:     3193number of bytes written:        71808512number of flush operations:     903total duration of reads (ns):   854291749703total duration of writes (ns):  93692774619total duration of flushes (ns): 7848596731

查看网络设备信息

┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$virsh domiflist workstation
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet4      bridge     privbr0    virtio      52:54:00:00:fa:09

查看网络状态

┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$virsh domifstat workstation vnet4
vnet4 rx_bytes 600038
vnet4 rx_packets 10176
vnet4 rx_errs 0
vnet4 rx_drop 0
vnet4 tx_bytes 72045
vnet4 tx_packets 610
vnet4 tx_errs 0
vnet4 tx_drop 0

查看内存信息,单位为 KB

┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$virsh  dommemstat workstation
actual 2097152
swap_in 0
swap_out 0
major_fault 304
minor_fault 147927
unused 1669348
available 1873292
usable 1631560
last_update 1696474286
rss 1246776┌──[root@liruilongs.github.io]-[/var/lib/libvirt/images]
└─$

博文部分内容参考

© 文中涉及参考链接内容版权归原作者所有,如有侵权请告知,这是一个开源项目,如果你认可它,不要吝啬星星哦 😃


https://lonesysadmin.net/tag/linux-vm-performance-tuning/

《 Red Hat Performance Tuning 442 》


© 2018-2024 liruilonger@gmail.com, All rights reserved. 保持署名-非商用-相同方式共享(CC BY-NC-SA 4.0)

这篇关于Linux 性能调优之虚拟化(Virtualization tuned)调优的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/683327

相关文章

Vue3 的 shallowRef 和 shallowReactive:优化性能

大家对 Vue3 的 ref 和 reactive 都很熟悉,那么对 shallowRef 和 shallowReactive 是否了解呢? 在编程和数据结构中,“shallow”(浅层)通常指对数据结构的最外层进行操作,而不递归地处理其内部或嵌套的数据。这种处理方式关注的是数据结构的第一层属性或元素,而忽略更深层次的嵌套内容。 1. 浅层与深层的对比 1.1 浅层(Shallow) 定义

性能测试介绍

性能测试是一种测试方法,旨在评估系统、应用程序或组件在现实场景中的性能表现和可靠性。它通常用于衡量系统在不同负载条件下的响应时间、吞吐量、资源利用率、稳定性和可扩展性等关键指标。 为什么要进行性能测试 通过性能测试,可以确定系统是否能够满足预期的性能要求,找出性能瓶颈和潜在的问题,并进行优化和调整。 发现性能瓶颈:性能测试可以帮助发现系统的性能瓶颈,即系统在高负载或高并发情况下可能出现的问题

Hadoop企业开发案例调优场景

需求 (1)需求:从1G数据中,统计每个单词出现次数。服务器3台,每台配置4G内存,4核CPU,4线程。 (2)需求分析: 1G / 128m = 8个MapTask;1个ReduceTask;1个mrAppMaster 平均每个节点运行10个 / 3台 ≈ 3个任务(4    3    3) HDFS参数调优 (1)修改:hadoop-env.sh export HDFS_NAMENOD

linux-基础知识3

打包和压缩 zip 安装zip软件包 yum -y install zip unzip 压缩打包命令: zip -q -r -d -u 压缩包文件名 目录和文件名列表 -q:不显示命令执行过程-r:递归处理,打包各级子目录和文件-u:把文件增加/替换到压缩包中-d:从压缩包中删除指定的文件 解压:unzip 压缩包名 打包文件 把压缩包从服务器下载到本地 把压缩包上传到服务器(zip

性能分析之MySQL索引实战案例

文章目录 一、前言二、准备三、MySQL索引优化四、MySQL 索引知识回顾五、总结 一、前言 在上一讲性能工具之 JProfiler 简单登录案例分析实战中已经发现SQL没有建立索引问题,本文将一起从代码层去分析为什么没有建立索引? 开源ERP项目地址:https://gitee.com/jishenghua/JSH_ERP 二、准备 打开IDEA找到登录请求资源路径位置

Linux 网络编程 --- 应用层

一、自定义协议和序列化反序列化 代码: 序列化反序列化实现网络版本计算器 二、HTTP协议 1、谈两个简单的预备知识 https://www.baidu.com/ --- 域名 --- 域名解析 --- IP地址 http的端口号为80端口,https的端口号为443 url为统一资源定位符。CSDNhttps://mp.csdn.net/mp_blog/creation/editor

【Python编程】Linux创建虚拟环境并配置与notebook相连接

1.创建 使用 venv 创建虚拟环境。例如,在当前目录下创建一个名为 myenv 的虚拟环境: python3 -m venv myenv 2.激活 激活虚拟环境使其成为当前终端会话的活动环境。运行: source myenv/bin/activate 3.与notebook连接 在虚拟环境中,使用 pip 安装 Jupyter 和 ipykernel: pip instal

黑神话,XSKY 星飞全闪单卷性能突破310万

当下,云计算仍然是企业主要的基础架构,随着关键业务的逐步虚拟化和云化,对于块存储的性能要求也日益提高。企业对于低延迟、高稳定性的存储解决方案的需求日益迫切。为了满足这些日益增长的 IO 密集型应用场景,众多云服务提供商正在不断推陈出新,推出具有更低时延和更高 IOPS 性能的云硬盘产品。 8 月 22 日 2024 DTCC 大会上(第十五届中国数据库技术大会),XSKY星辰天合正式公布了基于星

Linux_kernel驱动开发11

一、改回nfs方式挂载根文件系统         在产品将要上线之前,需要制作不同类型格式的根文件系统         在产品研发阶段,我们还是需要使用nfs的方式挂载根文件系统         优点:可以直接在上位机中修改文件系统内容,延长EMMC的寿命         【1】重启上位机nfs服务         sudo service nfs-kernel-server resta