176 karma · joined Nov 30, 2024 (1y ago) · 85 submissions
comment 1w ago · link · parent
Been there too. The thing I disliked most, that it sometimes get stuck in some strange pose, without any reasonable way of remediation. And because it is so annoying to debug, reboot become the only tool do deal with it.
The sheer complexity of systemd created nasty feedback loop: it is too complex to be debugged; people prefer to reboot it; that keeps problems keep accumulating inside.
comment 3w ago · link · parent
comment 1mo ago · link · parent
prev. submission - https://news.ycombinator.com/item?id=39529775
5.
Denmark data breach: it appears that the password was simply 123456(ekstrabladet.dk ↗)
2 points · by delamon · 1mo ago · discuss
comment 1mo ago · link · parent
Yes, I was and still running go and zig binaries with mlockall. Apps have large in-application caches and also perform large streaming reads of datasets bigger than available RAM. If it happens that several streaming reads running at same time, they push memory pressure hard enough, so kernel swaps out cold parts of in-app caches. That later leads to elevated latencies => mlockall to avoid that.
comment 1mo ago · link · parent
Code pages are paged in on demand: for any sufficiently large binary just some code pages will be mapped right after start. Given enough memory pressure, the active LRU will be shrunk often enough to push code pages out of the active LRU and then they are eventually evicted.
I'm not aware how it works in modern MGLRU, but I would assume similar ovservable behevior holds.
comment 1mo ago · link · parent
The good thing is that mlock/mlockall does not require elevated permissions. But it is bounded by the memlock rlimit, which you need to configure for the container. If you don't want paging/swapping, set it equal to the total memory you give to the container and call it a day.
I'm curious about the technical implications. Which ones do you have in mind?
To be honest, I don't quite see how mlock makes it complex. It's quite the opposite: it has very clear semantics and makes reasoning about system behavior simple. Disabling swap is the opposite: you're making a bet and hoping it works.
comment 1mo ago · link · parent
You are correct, that 90MB Go binary is not major memory consumer. But it doesn't matter what is the source of memory pressure. What matters is what kernel do under pressure. If you disable swap, then under memory pressure kernel can only pageout memory mapped files, no matter how small they are. And your code will be paged out.
comment 1mo ago · link · parent
Under memory pressure, the kernel evicts less popular pages from memory. If a page has been mapped from a file, it is dropped (if dirty, then it is written out first). If it is needed later, the kernel can read it back from the file. If a page is anonymous (read: heap page), then there is no backing file and the kernel copies it to swap before dropping it. This is swapping.
So, what happens if you disable swap and the kernel is low on memory? What can it evict? Anonymous pages cannot be evicted: there is no swap to put a copy in. The only choice the kernel has is to evict pages that are mapped from files. Those include pages mapped from the executable. You don't eliminate stalls by disabling swap, you just move them elsewhere: the kernel will page out code and your app gets paused whenever the execution flow hits such a page.
comment 1mo ago · link · parent
If you care about latency, mlock() your memory, do not disable swap. Swap is good and gives the kernel an equal opportunity to evict data and code pages.
comment 2mo ago · link · parent
comment 2mo ago · link · parent
comment 2mo ago · link · parent
"\e[A": history-search-backward
"\e[B": history-search-forward
in my .inputrc for years. I think, this is how command line worked in tcsh.It changes unconditional prev/next to prefix search. With empty command line it is the same as the old behavior. But if you enter "ls" and then press up-arrow, it will scroll through all commands in history that have "ls" as a prefix. I use it much more often than C-r.