AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1510548
Accepted
porton
porton
Asked: 2024-04-15 23:06:13 +0800 CST2024-04-15 23:06:13 +0800 CST 2024-04-15 23:06:13 +0800 CST

交换到不工作的文件

  • 772

swapspace我已经使用了所有的交换(由 Rust 编译器),尽管我确实安装了软件包,但它并没有增长。

               total        used        free      shared  buff/cache   available
Mem:            15Gi        12Gi       2.4Gi       1.8Gi       2.5Gi       2.6Gi
Swap:          2.0Gi       2.0Gi          0B

时间稍晚一些:

$ swapon
NAME           TYPE      SIZE USED PRIO
/dev/nvme0n1p2 partition   2G   2G   -2

如何使交换文件工作?我需要编辑吗/etc/swapspace.conf?

/etc/swapspace.conf:

# This file is part of Swapspace.
# 
# Swapspace is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# Swapspace is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with swapspace; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA


# Swap path: location where swapspace may create and delete swapfiles.  For
# security reasons this directory must be accessible to root and to root only.
#swappath="/var/lib/swapspace"

# Lower free-space threshold: if the percentage of free space drops below this
# number, additional swapspace is allocated
#lower_freelimit=20

# Upper free-space threshold: if the percentage of free space exceeds this
# number, swapspace will attempt to free up swapspace
#upper_freelimit=60

# Percentage of free space swapspace should aim for when adding swapspace.  This
# should fall somewhere between lower_freelimit and upper_freelimit.
#freetarget=30

# Smallest allowed size for individual swapfiles
#min_swapsize=4m

# Greatest allowed size for individual swapfiles
#max_swapsize=2t

# Duration (roughly in seconds) of the moratorium on swap allocation that is
# instated if disk space runs out, or the cooldown time after a new swapfile is
# successfully allocated before swapspace will consider deallocating swap space
# again.  The default cooldown period is about 10 minutes.
#cooldown=600

还:

$ systemctl status swapspace.service 
● swapspace.service - Swapspace, a dynamic swap space manager
     Loaded: loaded (/lib/systemd/system/swapspace.service; enabled; preset: enabled)
     Active: active (running) since Sat 2024-04-06 12:25:27 IDT; 1 week 2 days ago
       Docs: man:swapspace(8)
   Main PID: 5007 (swapspace)
      Tasks: 1 (limit: 18672)
     Memory: 696.0K
        CPU: 56min 53.175s
     CGroup: /system.slice/swapspace.service
             └─5007 /usr/sbin/swapspace

Apr 15 22:57:50 victor swapspace[5007]: Error: Could not enable swapfile '1': Invalid argument
Apr 16 07:54:11 victor swapspace[2805427]: Setting up swapspace version 1, size = 6.6 GiB (7115493376 bytes)
Apr 16 07:54:11 victor swapspace[2805427]: no label, UUID=e4971b48-a25a-48bd-bba4-c612569f996a
Apr 16 07:54:11 victor swapspace[5007]: Error: Could not enable swapfile '1': Invalid argument
Apr 16 08:04:19 victor swapspace[2920343]: Setting up swapspace version 1, size = 6.1 GiB (6517428224 bytes)
Apr 16 08:04:19 victor swapspace[2920343]: no label, UUID=5e0ae6b7-9715-4882-8cda-51707e96fbaa
Apr 16 08:04:19 victor swapspace[5007]: Error: Could not enable swapfile '1': Invalid argument
Apr 16 08:14:26 victor swapspace[2939298]: Setting up swapspace version 1, size = 6.1 GiB (6539935744 bytes)
Apr 16 08:14:26 victor swapspace[2939298]: no label, UUID=1ba42fae-6106-450e-9d96-3cdc040c84c6
Apr 16 08:14:26 victor swapspace[5007]: Error: Could not enable swapfile '1': Invalid argument
swap
  • 2 2 个回答
  • 26 Views

2 个回答

  • Voted
  1. Best Answer
    porton
    2024-04-16T13:23:42+08:002024-04-16T13:23:42+08:00

    显然,OpenZFS 目前不支持交换文件,如本错误报告中所述。

    • 0
  2. porton
    2024-04-29T10:50:28+08:002024-04-29T10:50:28+08:00

    通过从 ZFS 切换到 btrfs 解决了该问题。

    • 0

相关问题

  • 交换分区的重要性

  • 交换分区是否加密?

  • 从交换文件休眠和恢复

  • 我应该使我的交换分区有多大?

  • 如果有空闲 RAM,如何清空交换?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve