Bug 874631
Summary: | RFE: allow configuration of percentage values for disk space in journald.conf | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | John Florian <john> |
Component: | systemd | Assignee: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | dtardon, jentrena, johannbg, lnykryn, metherid, msekleta, plautrba, samuel-rhbugs, stefan.zwijsen, systemd-maint, vpavlin, zbyszek |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-08-12 14:36:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 784611, 1247768 |
Description
John Florian
2012-11-08 14:54:48 UTC
I have tried to implement this and it turned out to be a bad idea. The code gets needlessly complicated as the disk space gets evaluated in multiple places, for almost no additional value. There are also other problems, like the percentage being confusing if btrfs is used and the disks are hot-plugged. (In reply to Jan Synacek from comment #1) > I have tried to implement this and it turned out to be a bad idea. The code > gets needlessly complicated as the disk space gets evaluated in multiple > places, for almost no additional value. There are also other problems, like > the percentage being confusing if btrfs is used and the disks are > hot-plugged. Jan, thanks for looking into this. Could we at least changing the wording in the man page to make this a little clearer? I think something like the following would be better: s/The first pair defaults to 10% and the second to 15%/The first pair defaults to 10 (percent) and the second to 15 (percent)/ Or maybe mention that these settings expect a percent value without the symbol so that if you wanted SystemMaxUse set to 42% you'd enter "SystemMaxUse=42". There may be a misunderstanding here. The values are *not* specified in percentages, they are specified in absolute values followed by a unit. The percentages mentioned in the manpage are applied only if the user specifies no value for a given option. From journald.conf(5): "The first pair defaults to 10% and the second to 15% of the size of the respective file system." ... "Specify values in bytes or use K, M, G, T, P, E as units for the specified sizes (equal to 1024, 1024²,... bytes)." Oh! When I've read that paragraph up to now, I understood that "Specify values in bytes or use K, M, G, T, P, E as units for the specified sizes (equal to 1024, 1024²,... bytes)." applied only to SystemMaxFileSize= and RuntimeMaxFileSize=, not the rest of the settings in that same section. Your statements in comment 1 now make much more sense to me. What do you think of moving "Specify values in bytes or use K, M, G, T, P, E as units for the specified sizes (equal to 1024, 1024²,... bytes)." to its own paragraph just below where it appears now? Or maybe something even more radical (below)... I'm torn how to best present so much useful info and in what order. I like that the page describes what each setting does before getting into the details of how you specify the values. After all there's little point in understanding the latter if the former indicates you're reading about something irrelevant to your situation at hand. I wonder if there's something that could be done in the header line of each section to generally indicate the expected data type and then describe each data type once in a separate section. E.g., RateLimitInterval=, RateLimitBurst= [TIME] ... SystemMaxUse=, SystemKeepFree=, SystemMaxFileSize=, RuntimeMaxUse=, RuntimeKeepFree=, RuntimeMaxFileSize= [SIZE] ... UNITS OF MEASURE FOR OPTIONS SIZE Values are to be specified in the following units: "K", "M", "G", "T", "P", "E" (equal to 1024, 1024²,... bytes). TIME Values are to be specified in the following units: "s", "min", "h", "ms", "us". (In reply to John Florian from comment #4) > What do you think of moving "Specify values in bytes or use K, M, G, T, P, E > as units for the specified sizes (equal to 1024, 1024²,... bytes)." to its > own paragraph just below where it appears now? Or maybe something even more > radical (below)... The radical solution would make the formatting really inconsistent with the rest of the manpage (and possibly with many other manpages), but I think that moving that information to a separate paragraph would improve things. I'll write a patch and we'll see. For the records, I proposed a patch upstream: https://github.com/systemd/systemd/pull/241 FTR, pull/241 landed in systemd-221. (In reply to Zbigniew Jędrzejewski-Szmek from comment #7) > FTR, pull/241 landed in systemd-221. Yeah. Unfortunately that's just a doc improvement but won't help with BZ# 1247768. Expressing those values as percentages is still the most natural way. Also, if the filesystem size or the amount of ram is not known in advance, it is the only way which allows reasonable scaling. I'll take a stab at implementing this. For the record, I still would very much like to see this feature implemented. Also, it may be worth noting that according to JOURNALD.CONF(5), the *defaults* are implemented as percentages of the respective file system size. Anyone still looking at implementing the usage of percentages next to actual size? |