Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

After upgrade some aptly operations became extremely slow (hours vs minutes), suspect ext4 discard on QEMU

Đang mở
#1,536 6 bình luận 0 reaction 1 người được giao Xem trên GitHub

@neolynx đang làm issue này rồi.

Từ ngày 17/6/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug

Hi! After upgrading aptly we see a huge slowdown on a clone machine with (as far as we can tell) the same dataset and workload.

What changed
  • Old aptly: 1.4.0+ds1-4+b4
  • New aptly: 1.6.2
Symptoms (CI timings)

Before:

  • Deploy pool and staging: ~5 min
  • Deploy releases: ~5 min

After upgrade:

  • Deploy pool and staging: ~1h 25m
  • Deploy releases: >5h
How we run aptly

We run aptly api serve and our CI connects via a UNIX socket.
rootDir is on ext4 inside a QEMU/KVM VM.

Filesystem / storage

We noticed the filesystem is mounted with discard:
/dev/sda1 ... ext4 (rw,relatime,discard,...)

The virtual disk supports TRIM/UNMAP:

  • lsblk -D shows DISC-GRAN=4K, DISC-MAX=1G, ROTA=0 (QEMU HARDDISK)
  • /sys/block/sda/queue/discard_max_bytes = 1073741824
  • /sys/block/sda/queue/discard_granularity = 4096
TRIM / discard test

With nodiscard, fstrim -av trims a lot of data:

  • /: 26.2 GiB trimmed, real time ~12s

With discard, fstrim -av reports:

  • /: 0 B trimmed, real time ~0.02s

This suggests continuous discard is active.

Question / request for guidance
  1. Is discard known to hurt performance for LevelDB-heavy workloads used by aptly (compactions, table file churn, fsync)?
  2. Are there recommended filesystem mount options for aptly databases?
    For example, should we avoid discard and use periodic fstrim instead?
  3. Any aptly-side debug flags / logging / profiling you recommend to pinpoint why these steps became so slow after 1.6.2?

If you tell us what logs/metrics you need (aptly debug logs, strace snippet, LevelDB stats, etc.), we can provide them.

Thanks!

aptly config (redacted)
{
  "FileSystemPublishEndpoints": {},
  "S3PublishEndpoints": {
    "deb.wirenboard.com": {
      "acl": "public-read",
      "awsAccessKeyID": "<REDACTED>",
      "awsSecretAccessKey": "<REDACTED>",
      "bucket": "deb.wirenboard.com",
      "plusWorkaround": true,
      "region": "eu-west-1"
    }
  },
  "SwiftPublishEndpoints": {},
  "architectures": [],
  "dependencyFollowAllVariants": false,
  "dependencyFollowRecommends": false,
  "dependencyFollowSource": false,
  "dependencyFollowSuggests": false,
  "downloadConcurrency": 4,
  "downloadSourcePackages": false,
  "downloadSpeedLimit": 0,
  "gpgDisableSign": false,
  "gpgDisableVerify": false,
  "gpgProvider": "internal",
  "ppaCodename": "",
  "ppaDistributorID": "ubuntu",
  "rootDir": "/home/jenkins/aptly-ng"
}

{
"rootDir": "/home/jenkins/aptly-ng",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": [],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"dependencyFollowSource": false,
"dependencyVerboseResolve": false,
"gpgDisableSign": false,
"gpgDisableVerify": false,
"gpgProvider": "gpg",
"downloadSourcePackages": false,
"skipLegacyPool": true,
"ppaDistributorID": "ubuntu",
"ppaCodename": "",
"skipContentsPublishing": false,
"FileSystemPublishEndpoints": {},
"S3PublishEndpoints": {},
"SwiftPublishEndpoints": {}
}
Ngôn ngữ chính
Go
Star
2.9k
Fork
436
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aptly-dev/aptly

Tất cả issue của aptly-dev/aptly

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.