this post was submitted on 22 Aug 2026
9 points (100.0% liked)

Linux

67323 readers
1027 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
 

I can't seem to find anything like it, neither as a Fuse fs. Is there really no file system, that just evicts the oldest entries once it's full? I mean, it could be a simple queue.

This would have been the ideal tool for cache; no bothering with size limits and background daemons.

top 12 comments
sorted by: hot top controversial new old
[–] MajorasMaskForever@lemmy.world 5 points 1 week ago (1 children)

You probably can't find it because you're mixing mutually exclusive terminology.

A stack is a First-In Last-Out data structure. If your entry criteria is time, the oldest files will persist and the newer ones will get purged first.

If you want to remove oldest files first, you want a First In First Out queue.

Both of these will permanently delete the original file.

Caches are just a copy of real data, sitting somewhere that ideally has faster access times but smaller storage space. The real original file does not get modified. A cache will typically hold onto as much data as it can until it hits some cap, at which point a replacement algorithm is used to select which entry or entries to make space for the newly requested item. Very rarely will a cache delete entries on its own to minimize actively used space, but if they do they will likely just run the replacement algorithm without backfilling the space

[–] MonkderVierte@lemmy.zip 2 points 1 week ago

Right, yeah, queue, not stack, thanks.

About the last sentence, that's literally the freedesktop definition that cache can get deleted at any time. Important runtime data is state data.

A queue is imho ideal, because only the oldest cache no process cares anymore, gets purged.

[–] CallMeAl@piefed.zip 1 points 1 week ago (1 children)
[–] MonkderVierte@lemmy.zip 1 points 1 week ago (1 children)

Not at all. Is there a misunderstanding?

[–] CallMeAl@piefed.zip 3 points 1 week ago (1 children)

RRDtool refers to Round Robin Database tool. Round robin is a technique that works with a fixed amount of data, and a pointer to the current element. Think of a circle with some dots plotted on the edge. These dots are the places where data can be stored. Draw an arrow from the center of the circle to one of the dots; this is the pointer. When the current data is read or written, the pointer moves to the next element. As we are on a circle there is neither a beginning nor an end, you can go on and on and on. After a while, all the available places will be used and the process automatically reuses old locations. This way, the dataset will not grow in size and therefore requires no maintenance. RRDtool works with Round Robin Databases (RRDs). It stores and retrieves data from them.

I guess I was thinking about it too abstractly.

[–] MonkderVierte@lemmy.zip 1 points 1 week ago (1 children)
[–] CallMeAl@piefed.zip 2 points 1 week ago (1 children)

What are you trying to build/do?

[–] MonkderVierte@lemmy.zip 1 points 1 week ago* (last edited 1 week ago) (2 children)

Uncomplicated cache/trash management

  • try 1) I could have a cronjob to parse the cache directory for old files or if it gets full... - scratch that, it would get to a rather complex script with multiple rules.
  • try 2) a systemd service, relying on dbus calls, like the big distros do? No, that breaks even more outside of their ecosystem and i don't like bloaty DE.
  • try 3) or i could just have a partition in size of choice that "forgets" old files once full?

But sadly, doesn't seem to exist. Maybe i will have to learn how to create a fs? It's only a stack, would also be fast...

[–] CallMeAl@piefed.zip 2 points 1 week ago

Sounds like you want to automate Trash folder management. Why would number 1 require complex rules if number 3 can work with only the rule of delete the oldest file? Wouldn't the same rule work in both cases?

[–] buckykat@hexbear.net 1 points 1 week ago* (last edited 1 week ago) (1 children)

3) is what those fraudulent flash drives on amazon that are sold as much higher capacity than they actually are do.

[–] MonkderVierte@lemmy.zip 1 points 1 week ago

Nah, that one forgets new files.

[–] Sims@lemmy.ml 1 points 1 week ago

Not 100% on what 'stack-based' means here, but if 'stacking' = 'tiering', you could use a normal filesystem like bcachefs that have tiered storage ?

You can declare different tier devices for speed, availability or what you prefer, and have different compression, managed cache, auto-move hot data from cold storage, cold data to cold storage, and what not..

However, I've never actually tried it, so I'm likely exaggerating the possibilities. I think ZFS have tiering too, but maybe a filesystem specialist can chime in with some advice.

Alternatively, if it doesn't bother you, it could be a great task for a sota ai, to help/create/setup a simple fuse fs for your needs.