1.创建gitignore

This commit is contained in:
fslong 2025-07-10 14:18:43 +08:00
parent a96dbd7789
commit e9a6d0fd36
4 changed files with 65 additions and 10 deletions

59
.gitignore vendored Normal file
View File

@ -0,0 +1,59 @@
# 依赖目录
node_modules/
vendor/
# 构建输出
_site/
dist/
build/
public/
.vuepress/dist/
.docusaurus/
.cache/
# 日志文件
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# 编辑器/IDE 文件
.vscode/
.idea/
*.sublime-project
*.sublime-workspace
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# 环境变量
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# 操作系统文件
.DS_Store
Thumbs.db
ehthumbs.db
Desktop.ini
# 临时文件
*.tmp
*.temp
.tmp/
temp/
# 备份文件
*.bak
*.backup
*~
# 其他常见忽略文件
.sass-cache/
.eslintcache
.stylelintcache
.history/

View File

@ -1,5 +0,0 @@
{
"markdown.copyFiles.destination": {
"**/*": "${documentDirName}/assets/tuned/${unixTime}.${fileExtName}"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -11,7 +11,7 @@
1. 起因是我用deepin的时候总会遇到死机的情况猜测可能跟电源管理有关经过测试发现改用tuned后死机情况就无了所以应该是电源管理的问题所以就想着写一篇文章来介绍一下。
2. tuned是一个用于优化Linux系统的工具它可以根据硬件性能、环境情况、负载情况等动态调整系统的参数以实现更好的性能和 stability。
3. tuned的配置文件位于`/etc/tuned/`目录下,每个配置文件都对应一种场景,例如`balanced`表示均衡模式,`latency-performance`表示延迟性能模式,`virtual-guest`表示虚拟机模式等等。
![alt text](assets/tuned/1752113280627.png)
![alt text](./assets/tuned/1752113280627.png)
1. 我们可以通过他来选取适合我们的场景,比如虚拟机模式,这样可以使虚拟机获得更好的性能,减少延迟,再比如笔记本模式,我们选择`powersave`模式,这样可以使笔记本的电池续航时间更长。
@ -19,10 +19,10 @@
## 一、使用tuned调节电源管理方案
1. 为了使系统在虚拟机中运行时获得更好的性能我们可以通过tuned来调节电源管理方案。
2. 首先我们安装tuned工具`sudo apt install tuned`。
![alt text](assets/tuned/1752113518002.png)
![alt text](./assets/tuned/1752113518002.png)
3. 启动服务`sudo systemctl enable --now tuned`
3. 使用`tuned-adm list`命令查看当前所有可用的配置方案。
![alt text](assets/tuned/1752113330960.png)
![alt text](./assets/tuned/1752113330960.png)
- 以下是各个配置文件的用途总结表格:
@ -70,8 +70,9 @@
- **当前活动配置**balanced通用平衡配置
- 这些方案都是针对不同场景的配置方案,可以根据自己的需求选择一个合适的方案。
3. 接下来,我们使用`tuned-adm profile`命令指定一个配置方案,例如针对笔记本我用的是`sudo tuned-adm profile laptop-ac-powersave`,需要前台响应及时的时候我选择`sudo tuned-adm profile cpu-partitioning`这样会增加功耗,但是能获得更好的性能。
![alt text](assets/tuned/1752114136842.png)
![alt text](./assets/tuned/1752114136842.png)
4. 更新systemd的设置ok2.2切换配置后会有个提示:![alt text](./assets/tuned/1752115833342.png)
- 此时我们就需要按他说的,执行`sudo dracut -f`即可,如果没有安装就安装`dracut`即可
## 二、使用建议
1. 具体使用哪个配置方案需要大家根据自己机器的情况来选择。