4 ms·
I completely agree with one of the comments from there: > But the fundamental conclusion is: the design was wrong. It should not have used mmapped writes. pwri
by adrian_b 2mo ago
I completely agree with one of the comments from there:
> But the fundamental conclusion is: the design was wrong. It should not have used mmapped writes. pwrite would have been far better.
It really does not make any sense to use memory-mapped files when writing logs.
Not even pwrite makes sense, because logs should normally be written by opening and using the log files as append-only sequential files.
Only when reading logs, to search for problems, accessing them as read-only memory-mapped files is OK.
Actually not only for logs, but almost always, read-write memory-mapped files are either inefficient or too complex to use (i.e. to avoid problems you must carefully use msync and/or madvise, which eliminates the simplicity that makes memory-mapped files preferable to using pread/pwrite). It is better to use memory-mapped files only for read-only accesses, using the appropriate option flags in open and mmap.
- giov4 2mo agogreat and clear summary thank you! I would laso add that if my design decisions or development actions lead to an issue affecting multiple linux distro defaults I would feel responsible and rush for a solid fix instead of this https://github.com/systemd/systemd/issues/15292#issuecomment-777276876 https://github.com/systemd/systemd/issues/15292#issuecomment...
- giov4 2mo agoadditionally and ironically in a case like this AI would have been probably more efficient and already resolved the problem with a PR cycle instead of human histeric gate keeping.
- smartmic 2mo agoThis is really astonishing. Are there no checks and balances in place for design decision in such a critical system component? What were the thoughts of all the major distros when they decided to go with systemd then?
- pineapplepizza6 2mo ago[dead]
- kps 2mo agoThere is a certain consistency to IBM-dominated projects that suggests that there are checks and balances and that they are working as intended.
- otterley 2mo agoThis design predates the IBM acquisition by seven years.
- NewJazz 2mo agoAnd Poettering worked at Microsoft until recently.
- sam_lowry_ 2mo agoAnd the went on to make age checks mandatory on Linux, earning money in the process.
- otterley 2mo agosystemd was funded and implemented by the biggest commercial distro, Red Hat, first. Other distros were influenced by its decision (RH has always had a lot of influence on distro direction generally) and followed suit. I’m not sure Red Hat ever had a lot of database design expertise internally and that probably explains the design and outcome. As I said earlier, the design was not subject to public scrutiny before it was implemented.
- Throwaway123129 2mo agoI wonder if something like https://github.com/open-telemetry/otel-arrow https://github.com/open-telemetry/otel-arrow would be a better fit instead