Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In this distribution, are shared libraries really shared, or duplicated?


If I understand what you're asking: duplicated.

What Bedrock Linux does, from a high-level point of view, is intercept filesystem calls for things that would conflict between two packages and redirect them to something unique per client. So if you have two files that each need mutually exclusive versions of a given library placed in the same path, and they both try to read that path, they'll get different libraries. However, if they try to read something that needs to be the same for interaction (say, a file in /tmp), they'll both see the same file.

The system that picks what is shared between clients and what is kept separate is not very fine-grained; it is broad things like /lib and /usr which are kept separate and unique per client, and things like /home and /tmp that are shared. Or at least that is how it is intended - it is configurable, and in theory you could make it much more fine grained and share libraries and what not. However, that's not recommended.

So yes, as you've likely figured out, Bedrock Linux will eat a fair bit of disk space; you'll likely have multiple different copies of things like glibc on your system. There's no reason a de-dup'ing filesystem couldn't free up space. If you're short on disk space, Bedrock Linux probably isn't the idea distro for you.


I would be more concerned with the RAM these libraries consumed. Some may just use code pages, but others may use large amounts of BSS.


That's also a very legitimate concern. On systems with limited RAM - or disk space - one should either limit themselves to a relatively small number of clients/packages, more likely, prefer another operating system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: