Thread View: muc.lists.freebsd.fs
10 messages
10 total messages
Started by void
Sun, 29 Nov 2026 11:32
compressing an in-ram filesystem
Author: void
Date: Sun, 29 Nov 2026 11:32
Date: Sun, 29 Nov 2026 11:32
31 lines
7765 bytes
7765 bytes
--2pu7PqxHYkQoblmO Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, As subject, is there such a thing? I'd like to mount a compressed /usr/obj in ram.=20 --=20 void<at>f-m.fm | GPG fingerprint: BD97 5B52 1B78 B7A9 AFFE 7DD4 FD32 D1F9 = 0814 DECD Please don't Cc: as I'm already subscribed to the list. --2pu7PqxHYkQoblmO Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQS9l1tSG3i3qa/+fdT9MtH5CBTezQUCawwNVBsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDMACgkQ/TLR+QgU3s32dQEAvf7C+DA6X26wSglB85/Z xctCP+NORO7kSOG7RvEA6lkBAP47851ubBudOzDHO+UppySnVz0fbKxSOs8nkUqR 578B =iC1f -----END PGP SIGNATURE----- --2pu7PqxHYkQoblmO-- -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: Andrea "Nemesi"
Date: Sun, 29 Nov 2026 12:18
Date: Sun, 29 Nov 2026 12:18
20 lines
6057 bytes
6057 bytes
On 29 Nov 2026, at 12:32, void <void@f-m.fm> wrote: > As subject, is there such a thing? > I'd like to mount a compressed /usr/obj in ram. — Maybe creating a ZFS pool over an md ram-backed device? I don’t know, given ARC and the ZFS overhead, how much you will gain, though. Regards, A. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: Don Lewis
Date: Sun, 29 Nov 2026 12:58
Date: Sun, 29 Nov 2026 12:58
13 lines
2114 bytes
2114 bytes
On 29 Nov, void wrote: > Hi, > As subject, is there such a thing? > I'd like to mount a compressed /usr/obj in ram. This would be an awesome optimization for poudriere. If the files are compressed going into a compressed tmpfs, then memory pressure and swap usage would be greatly reduced. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: Don Lewis
Date: Sun, 29 Nov 2026 13:10
Date: Sun, 29 Nov 2026 13:10
22 lines
2559 bytes
2559 bytes
On 29 Nov, Andrea "Nemesi" wrote: > On 29 Nov 2026, at 12:32, void <void@f-m.fm> wrote: >> As subject, is there such a thing? >> I'd like to mount a compressed /usr/obj in ram. — > > Maybe creating a ZFS pool over an md ram-backed device? > > I don’t know, given ARC and the ZFS overhead, how much you will gain, > though. I'd want it to be able to overflow into swap. ARC does a lot of what I want, but I don't want the overhead associated with consistency across crashes and reboots. If the system reboots, it is OK if the filesystem comes back empty. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: Andrea Cocito
Date: Sun, 29 Nov 2026 13:28
Date: Sun, 29 Nov 2026 13:28
18 lines
6202 bytes
6202 bytes
On 29 Nov 2026, at 14:11, Don Lewis <truckman@freebsd.org> wrote: > I'd want it to be able to overflow into swap. > ARC does a lot of what I want, but I don't want the overhead associated > with consistency across crashes and reboots. If the system reboots, it > is OK if the filesystem comes back empty. > You get that with swap backed Md, once again: I would not bet it to work decently with “small” RAM. Regards, A. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: Andrea Cocito
Date: Sun, 29 Nov 2026 13:46
Date: Sun, 29 Nov 2026 13:46
22 lines
6426 bytes
6426 bytes
On 29 Nov 2026, at 14:28, Andrea Cocito <blackye@gmail.com> wrote: > On 29 Nov 2026, at 14:11, Don Lewis <truckman@freebsd.org> wrote: >> I'd want it to be able to overflow into swap. >> ARC does a lot of what I want, but I don't want the overhead associated >> with consistency across crashes and reboots. If the system reboots, it >> is OK if the filesystem comes back empty. >> > You get that with swap backed Md, once again: I would not bet it to work decently with “small” > RAM. Rethinking about it: swap-backed md + geom_uzip + RO UFS might be the architecture that better fits your needs. A. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: void
Date: Sun, 29 Nov 2026 14:24
Date: Sun, 29 Nov 2026 14:24
57 lines
9109 bytes
9109 bytes
--MsLDjJN/dV/ytYHX Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 29, 2026 at 04:58:37AM -0800, Don Lewis wrote: >On 29 Nov, void wrote: >> Hi, >> As subject, is there such a thing? >> I'd like to mount a compressed /usr/obj in ram. > >This would be an awesome optimization for poudriere. If the files are >compressed going into a compressed tmpfs, then memory pressure and swap >usage would be greatly reduced. Yeah this is the sort of context I'd be looking for. rpi4b/8GB. Also for make buildworld and friends if you want to optimise world/kernel= =20 for your arch. Then a script at the end of the build/install, but before=20 reboot, zipping it all up into an on-disk file, so all that obj isn't waste= d. Useful if you want to follow -current, have custom kernel, remove all the= =20 debug from everywhere. I think I can get away with a 5GB tmpfs uncompressed but it would be really great to have a compressed tmpfs for this job because as you probably know, obj compresses *really well*. I'm going to try this with 15-stable. Up till now I've mounted src and obj in nfs but the build gets fs errors with more than -j1. I wonder if lockd would help on the client. But obj in tmpfs would, I imagine, be *way* quicker. --=20 void<at>f-m.fm | GPG fingerprint: BD97 5B52 1B78 B7A9 AFFE 7DD4 FD32 D1F9 = 0814 DECD Please don't Cc: as I'm already subscribed to the list. --MsLDjJN/dV/ytYHX Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQS9l1tSG3i3qa/+fdT9MtH5CBTezQUCaww1rxsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDMACgkQ/TLR+QgU3s3xhQEA3myQdWqv+TeYVhEqUylu vn5LPvigAMd77rT/+9h2bYUBAK++n+o07181zP3MBLlmDaEC+OFj+1+uQ3qxbzaP 6D0D =AhVh -----END PGP SIGNATURE----- --MsLDjJN/dV/ytYHX-- -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: void
Date: Sun, 29 Nov 2026 16:51
Date: Sun, 29 Nov 2026 16:51
53 lines
8921 bytes
8921 bytes
--q3zM5kJXr9wkM3lf Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 29, 2026 at 01:18:25PM +0100, Andrea "Nemesi" wrote: >On 29 Nov 2026, at 12:32, void <void@f-m.fm> wrote: >> As subject, is there such a thing? >> I'd like to mount a compressed /usr/obj in ram. =E2=80=94 > >Maybe creating a ZFS pool over an md ram-backed device? > >I don=E2=80=99t know, given ARC and the ZFS overhead, how much you will ga= in, though. Trying it, as plain tmpfs kept locking up the system. root@testbuilder-rpi4b:~ # mdconfig -a -t swap -s 4G -u 0 root@testbuilder-rpi4b:~ # zpool create -o ashift=3D12 objpool /dev/md0 root@testbuilder-rpi4b:~ # zfs set compression=3Dzstd objpool root@testbuilder-rpi4b:~ # zfs set mountpoint=3D/usr/obj objpool root@testbuilder-rpi4b:~ # zfs list NAME USED AVAIL REFER MOUNTPOINT objpool 84.0M 3.57G 83.6M /usr/obj root@testbuilder-rpi4b:~ # zfs list NAME USED AVAIL REFER MOUNTPOINT objpool 112M 3.54G 112M /usr/obj root@testbuilder-rpi4b:~ # Running a -j4 buildworld now --=20 void<at>f-m.fm | GPG fingerprint: BD97 5B52 1B78 B7A9 AFFE 7DD4 FD32 D1F9 = 0814 DECD Please don't Cc: as I'm already subscribed to the list. --q3zM5kJXr9wkM3lf Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQS9l1tSG3i3qa/+fdT9MtH5CBTezQUCawxYABsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDMACgkQ/TLR+QgU3s0p/gD8CS5+A/Bsj1I/CvElnv5d KfbFz9YJRvZ6UgO6av6SEWMBAJkoaL3K7ZGiGAsjKrDzRq5Mz2SGNQiJiOW2y/ne ajYC =y6hA -----END PGP SIGNATURE----- --q3zM5kJXr9wkM3lf-- -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: void
Date: Sun, 29 Nov 2026 17:01
Date: Sun, 29 Nov 2026 17:01
36 lines
8086 bytes
8086 bytes
--tBZLMt0vFQHCBjfy Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 29, 2026 at 04:51:23PM +0000, void wrote: >Running a -j4 buildworld now Hm, it fails here: /usr/obj/usr/src/arm64.aarch64/tmp/obj-tools/usr.bin/clang/llvm-tblgen/llvm= -tblgen --=20 void<at>f-m.fm | GPG fingerprint: BD97 5B52 1B78 B7A9 AFFE 7DD4 FD32 D1F9 = 0814 DECD Please don't Cc: as I'm already subscribed to the list. --tBZLMt0vFQHCBjfy Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQS9l1tSG3i3qa/+fdT9MtH5CBTezQUCawxaZxsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDMACgkQ/TLR+QgU3s0kggD/XkKo1USlF+ZqYkBc6zJn gUFv9ZsfhfWdBcIKemORWD0BAK425RQzq0ZoKrGUObbIHqMB29WBXIIBLb4VWCms Y94O =bQCf -----END PGP SIGNATURE----- --tBZLMt0vFQHCBjfy-- -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: compressing an in-ram filesystem
Author: Don Lewis
Date: Tue, 01 Dec 2026 06:38
Date: Tue, 01 Dec 2026 06:38
41 lines
3499 bytes
3499 bytes
On 29 Nov, void wrote: > On Sun, Nov 29, 2026 at 04:58:37AM -0800, Don Lewis wrote: >>On 29 Nov, void wrote: >>> Hi, >>> As subject, is there such a thing? >>> I'd like to mount a compressed /usr/obj in ram. >> >>This would be an awesome optimization for poudriere. If the files are >>compressed going into a compressed tmpfs, then memory pressure and swap >>usage would be greatly reduced. > > Yeah this is the sort of context I'd be looking for. rpi4b/8GB. > > Also for make buildworld and friends if you want to optimise world/kernel > for your arch. Then a script at the end of the build/install, but before > reboot, zipping it all up into an on-disk file, so all that obj isn't wasted. > > Useful if you want to follow -current, have custom kernel, remove all the > debug from everywhere. > > I think I can get away with a 5GB tmpfs uncompressed but it would be really > great to have a compressed tmpfs for this job because as you probably > know, obj compresses *really well*. I'm going to try this with 15-stable. > > Up till now I've mounted src and obj in nfs but the build gets fs errors > with more than -j1. I wonder if lockd would help on the client. > But obj in tmpfs would, I imagine, be *way* quicker. I'm at the other end of the spectrum. Ryxen CPU maxed out with 64 GB of RAM and 100 GB of NVME swap. I've got poudriere configured to use tmpfs for wrkdir, data, and localbase (everything other than the jails). Swap is untouched for most of the run, but hits 60-80GB near the end when the big ports like chromium get built. Even then, the I/O rate to swap is much less than the spinning rust I/O rate. All of those C++ compiles only slowly produce output. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads