From george at ceetonetechnology.com Thu Mar 10 10:14:13 2022 From: george at ceetonetechnology.com (George Rosamond) Date: Thu, 10 Mar 2022 10:14:13 -0500 Subject: [talk] network resilience in UA Message-ID: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> Some very interesting data points in here: https://labs.ripe.net/author/emileaben/the-resilience-of-the-internet-in-ukraine/ g From steve.b at osfda.org Thu Mar 10 10:22:43 2022 From: steve.b at osfda.org (steve.b at osfda.org) Date: Thu, 10 Mar 2022 10:22:43 -0500 Subject: [talk] network resilience in UA In-Reply-To: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> References: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> Message-ID: <6997ac7b-4508-311d-1fcc-b13155f98bef@osfda.org> They should not be using Telegram; unless they are aware it's not secure and are disinforming the Russians. [I'm 90% sure Putin has its keys.] The Russian people will now be needing some good steganography comm software. ------------------------------------------------------------------------ Have you guys ever given a talk on Intel IME and AMD Platform Security Processor? You know: the private sector monopoly end-run to the Clipper Chip being previously denied by Congress. On 3/10/22 10:14, George Rosamond wrote: > Some very interesting data points in here: > > https://labs.ripe.net/author/emileaben/the-resilience-of-the-internet-in-ukraine/ > > > g > > _______________________________________________ > talk mailing list > talk at lists.nycbug.org > https://lists.nycbug.org:8443/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikel.king at gmail.com Thu Mar 10 10:26:57 2022 From: mikel.king at gmail.com (Mikel King) Date: Thu, 10 Mar 2022 10:26:57 -0500 Subject: [talk] network resilience in UA In-Reply-To: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> References: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> Message-ID: <1935E65C-ECD7-4132-93AF-3A968EA39CBC@gmail.com> Thanks George. A very interesting read. > On Mar 10, 2022, at 10:14 AM, George Rosamond wrote: > > Some very interesting data points in here: > > https://labs.ripe.net/author/emileaben/the-resilience-of-the-internet-in-ukraine/ > > g > > _______________________________________________ > talk mailing list > talk at lists.nycbug.org > https://lists.nycbug.org:8443/mailman/listinfo/talk -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: Message signed with OpenPGP URL: From george at ceetonetechnology.com Thu Mar 10 10:27:53 2022 From: george at ceetonetechnology.com (George Rosamond) Date: Thu, 10 Mar 2022 10:27:53 -0500 Subject: [talk] network resilience in UA In-Reply-To: <6997ac7b-4508-311d-1fcc-b13155f98bef@osfda.org> References: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> <6997ac7b-4508-311d-1fcc-b13155f98bef@osfda.org> Message-ID: <248cf4e3-84ab-c4c7-7f69-85840eb474f8@ceetonetechnology.com> On 3/10/22 10:22, steve.b at osfda.org wrote: > They should not be using Telegram; unless they are aware it's not secure > and are disinforming the Russians. Yes, had those arguments in a variety of different contexts. look at metrics.torproject.org stats on ru usage. > > [I'm 90% sure Putin has its keys.] > > The Russian people will now be needing some good steganography comm > software. The fact that Twitter adopted an onion service is a big deal https://www.theguardian.com/technology/2022/mar/09/twitter-tor-version-russia-block > > ------------------------------------------------------------------------ > > Have you guys ever given a talk on Intel IME and AMD Platform Security > Processor? > > You know: the private sector monopoly end-run to the Clipper Chip being > previously denied by Congress. No, we haven't. IIRC that was in 1997 and we launched in 2003/2004. But since EARNIT I've mentioned the Clipper Chip more frequently than i've done in years.. g From steve.b at osfda.org Thu Mar 10 10:40:35 2022 From: steve.b at osfda.org (steve.b at osfda.org) Date: Thu, 10 Mar 2022 10:40:35 -0500 Subject: [talk] network resilience in UA In-Reply-To: <248cf4e3-84ab-c4c7-7f69-85840eb474f8@ceetonetechnology.com> References: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> <6997ac7b-4508-311d-1fcc-b13155f98bef@osfda.org> <248cf4e3-84ab-c4c7-7f69-85840eb474f8@ceetonetechnology.com> Message-ID: <6f8f6320-7c63-fb25-c7d9-20f3cad8cf0e@osfda.org> The implications of IME to the public took off around 2017. Little has been done to address this ticking timebomb of critical security infrastructure. I think leaks of IME firmware code could lead to epic spyware and malware implications I suspect the US/NSA is drinking its own Kool Aid, thinking that it's a Good Thing that they have access to it; but once other parties sell the info to the highest bidders, we will be having quite the computer security shitshow! I would like to do a survey talk next time you resume in-person meetups. I think there could be an open source solution to the problem, provided it were to get backed by 800 pound international political gorillas. Intel is introducing a mining chip; how much you wanta bet it will be on there? (and to conceal it, they'll call it something else...) If someone is more qualified to do such a presentation, feel free to do so... On 3/10/22 10:27, George Rosamond wrote: > On 3/10/22 10:22, steve.b at osfda.org wrote: >> They should not be using Telegram; unless they are aware it's not >> secure and are disinforming the Russians. > > Yes, had those arguments in a variety of different contexts. > > look at metrics.torproject.org stats on ru usage. > >> >> [I'm 90% sure Putin has its keys.] >> >> The Russian people will now be needing some good steganography comm >> software. > > The fact that Twitter adopted an onion service is a big deal > > https://www.theguardian.com/technology/2022/mar/09/twitter-tor-version-russia-block > > >> >> ------------------------------------------------------------------------ >> >> Have you guys ever given a talk on Intel IME and AMD Platform >> Security Processor? >> >> You know: the private sector monopoly end-run to the Clipper Chip >> being previously denied by Congress. > > No, we haven't. > > IIRC that was in 1997 and we launched in 2003/2004. > > But since EARNIT I've mentioned the Clipper Chip more frequently than > i've done in years.. > > g > > _______________________________________________ > talk mailing list > talk at lists.nycbug.org > https://lists.nycbug.org:8443/mailman/listinfo/talk From kmsujit at gmail.com Thu Mar 10 23:47:03 2022 From: kmsujit at gmail.com (Sujit K M) Date: Fri, 11 Mar 2022 10:17:03 +0530 Subject: [talk] network resilience in UA In-Reply-To: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> References: <0275abb2-5290-0158-f612-018593490564@ceetonetechnology.com> Message-ID: Might be internet is more concentrated in cities, the technology used by ISP might have something to do with the resiliency, example how the network is laid out. How deep is the network from ground level. As far as I know these attack' have been superficial, targetting either building, with not much impact on what is below the surface. On Thu, 10 Mar, 2022, 20:44 George Rosamond, wrote: > Some very interesting data points in here: > > > https://labs.ripe.net/author/emileaben/the-resilience-of-the-internet-in-ukraine/ > > g > > _______________________________________________ > talk mailing list > talk at lists.nycbug.org > https://lists.nycbug.org:8443/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fogisforfrogs at gmail.com Fri Mar 11 18:22:29 2022 From: fogisforfrogs at gmail.com (George Cooper) Date: Fri, 11 Mar 2022 18:22:29 -0500 Subject: [talk] Need Help installing favorite game Trek73 Message-ID: Hi my name is George Cooper, I live in NJ, and I am looking for someone that can help me install and run a favorite game of mine that was been converted to FreeBSD. I have downloaded VirtualBox to my Windows 7 PC, and have installed FreeBSD to VirtualBox. I am clueless about the next steps. Links to the source code and info about the origins of the game. https://github.com/kristopherjohnson/trek73 I have played Trek73 for years on DOSBox, with a DOS version of the game, but I am wanting to use the FreeBSD version, which has other features, called "ship builder" which would allow for custom ships. https://kermitmurray.com/trek73/trek73-software/freebsd-version/ I thought someone who knows how to create the commands or set up the game files, which are downloaded to my Windows PC could help me in a Zoom call or something. Thanks and hope to hear from someone soon. George Cooper 973 953 1762 cell/text -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpb at jimby.name Sat Mar 12 19:57:46 2022 From: jpb at jimby.name (jpb) Date: Sat, 12 Mar 2022 19:57:46 -0500 Subject: [talk] Need Help installing favorite game Trek73 In-Reply-To: References: Message-ID: <20220312195746.601877bc.jpb@jimby.name> On Fri, 11 Mar 2022 18:22:29 -0500 George Cooper wrote: > Hi my name is George Cooper, I live in NJ, and I am looking for > someone that can help me install and run a favorite game of mine that > was been converted to FreeBSD. I have downloaded VirtualBox to my > Windows 7 PC, and have installed FreeBSD to VirtualBox. I am > clueless about the next steps. Links to the source code and info > about the origins of the game. > https://github.com/kristopherjohnson/trek73 I have played Trek73 for > years on DOSBox, with a DOS version of the game, but I am wanting to > use the FreeBSD version, which has other features, called "ship > builder" which would allow for custom ships. > https://kermitmurray.com/trek73/trek73-software/freebsd-version/ I > thought someone who knows how to create the commands or set up the > game files, which are downloaded to my Windows PC could help me in a > Zoom call or something. Thanks and hope to hear from someone soon. > George Cooper > 973 953 1762 cell/text Welcome George from a former NJer myself! Ok, in brief, here are the steps you'll need to take. 1. Log into your FreeBSD virtual machine instance as a normal user. 2. Grab the code from Github: fetch https://github.com/kristopherjohnson/trek73/archive/refs/heads/master.zip 3. unzip master.zip && cd trek73-master You'll have to fix a few things in the code. The modern C compiler in FreeBSD is less forgiving than whatever compiler was originally used. I had to: * fix the definition of round() to be compatible with round() in /usr/include/math.h * comment out the encrwrite() function in src/save.c * declare Input[] and *Inptr as extern in src/command.l * remove static from class[] in src/shipyard.c It then *compiles*. Whether or not it will throw an error from all the compiled warnings is anyone's guess. I leave fixing all the FreeBSD compiler warnings to a more capable developer. Anyway, that should get you started. Enjoy! Jim B. Had to smile seeing the old uucp style addresses: hplabs!hpccc!okamoto and ames!yee It's been a while since I've seen that :-) From george at ceetonetechnology.com Wed Mar 16 11:03:26 2022 From: george at ceetonetechnology.com (George Rosamond) Date: Wed, 16 Mar 2022 11:03:26 -0400 Subject: [talk] Does swap still matter? Message-ID: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> This has been an on and off debate I've had with myself and others, and wanted some input from others. Input from live experiences is great, input from low-level devs is even better. When RAM never seemed adequate for a system in the past, the utility of swap was obvious. You would see the spikes on top(1) when swap was hit. swap = 2 x RAM, blah blah. Today, when those 64G or more of RAM are the norm for bare-metal boxes, and it's overkill in many contexts, is swap still necessary? Do certain applications/OS functions still use swap as opposed to RAM for some reason? I mean, swap is normally encrypted by default, so there is a justifiable reason to use swap over RAM. I know encrypted RAM is a (small) part of the universe today, including with the Ryzen pro series. Looking forward to being enlightened. g From kmsujit at gmail.com Wed Mar 16 11:09:35 2022 From: kmsujit at gmail.com (Sujit K M) Date: Wed, 16 Mar 2022 20:39:35 +0530 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: I believe things have changed further from bare metal to virtualization, like VMware and Citrix. So adding processor or memory is nolonger a difficult or costly task. But swap has still got a purpose is technically sound is what I believe. On Wed, 16 Mar, 2022, 20:35 George Rosamond, wrote: > This has been an on and off debate I've had with myself and others, and > wanted some input from others. Input from live experiences is great, > input from low-level devs is even better. > > When RAM never seemed adequate for a system in the past, the utility of > swap was obvious. You would see the spikes on top(1) when swap was hit. > > swap = 2 x RAM, blah blah. > > Today, when those 64G or more of RAM are the norm for bare-metal boxes, > and it's overkill in many contexts, is swap still necessary? > > Do certain applications/OS functions still use swap as opposed to RAM > for some reason? I mean, swap is normally encrypted by default, so there > is a justifiable reason to use swap over RAM. > > I know encrypted RAM is a (small) part of the universe today, including > with the Ryzen pro series. > > Looking forward to being enlightened. > > g > > _______________________________________________ > talk mailing list > talk at lists.nycbug.org > https://lists.nycbug.org:8443/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bcully at gmail.com Wed Mar 16 12:27:22 2022 From: bcully at gmail.com (Brian Cully) Date: Wed, 16 Mar 2022 12:27:22 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: On 3/16/22 11:03, George Rosamond wrote: Today, when those 64G or more of RAM are the norm for bare-metal boxes, and it's overkill in many contexts, is swap still necessary? Do certain applications/OS functions still use swap as opposed to RAM for some reason? I mean, swap is normally encrypted by default, so there is a justifiable reason to use swap over RAM. I don't use it on servers because I'd rather have things die than incur a swap penalty if things start to get bogged down. To be fair, I was also turning off swap in the 90s, when RAM was much tighter, for the same reason. When things started to get hammered swap *always* made the problem worse because now your disks are thrashing. I don't use it at home, either, because I have more than adequate RAM on my home systems and don't see a need for it, and I value consistent interactive performance. If I had substantially less RAM I'd turn on swap to cover for bloated applications like web browsers, or VMS I'm not actively using. Theoretically, swap can make your system faster because it allows you to page out RAM that's been allocated and almost never used for buffers. I don't know if there are systems that actually do this in practice, though, and it opens you up to severe performance degradation. Swap's always seemed to me like this thing that, in theory, allows for more flexibility, but in practice is almost never worth the trade offs. As far as swap being encrypted, I don't see that as much of a reason to use over RAM. The keys to decrypt it still have to be in RAM somewhere, and if you can arbitrarily read RAM, it doesn't seem like it's much of a stretch to find the key and read whatever you want off of swap. The value in on-disk encryption is when the system is off, right? If it's on, and someone has the access to read your block devices raw, then they can also read your key out of the kernel too, right? Or has this changed in the advent of TPM and its ilk? -bjc From jkeenan at pobox.com Wed Mar 16 12:12:39 2022 From: jkeenan at pobox.com (James E Keenan) Date: Wed, 16 Mar 2022 12:12:39 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: <9dc97ed3-7549-2088-42f3-65e4923e700e@pobox.com> On 3/16/22 11:03, George Rosamond wrote: > This has been an on and off debate I've had with myself and others, and > wanted some input from others. Input from live experiences is great, > input from low-level devs is even better. > > When RAM never seemed adequate for a system in the past, the utility of > swap was obvious. You would see the spikes on top(1) when swap was hit. My laptop is now 8 years old, so I'm still living in the world where swap is hit. > > swap = 2 x RAM, blah blah. > > Today, when those 64G or more of RAM are the norm for bare-metal boxes, > and it's overkill in many contexts, is swap still necessary? > > Do certain applications/OS functions still use swap as opposed to RAM > for some reason? I mean, swap is normally encrypted by default, so there > is a justifiable reason to use swap over RAM. > I'm so low-level that I never knew that! From carton at Ivy.NET Wed Mar 16 12:25:35 2022 From: carton at Ivy.NET (Miles Nordin) Date: Wed, 16 Mar 2022 12:25:35 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: <20220316162535.GA14202@castrovalva.Ivy.NET> > When RAM never seemed adequate for a system in the past, the utility of > swap was obvious. idea #1: The measure of used RAM isn't obvious. RAM allocated by sbrk or mmap is not used until it's written to for the first time. (or maybe read, I am not sure) what's more interesting wrt swap is, on some mallocs, like at least older GNU malloc, freed RAM is never returned to the OS. tcmalloc does return RAM to the OS, but on some kind of lazy background thread or something. so if a C program uses a whole bunch of RAM at startup then frees it, the physical RAM can only actually be freed by writing it to swap (then never reading it), or by the process exiting. The best measure of memory a program is actually using is thus often based on a presumption of swap. It's the "working set," or the RSS under memory pressure, the set of pages that would lead to a catastrophic drop in performance if they were swapped. I have seen some systems that claim to measure working set without memory pressure or swap, but seems rare and untrustworthy. This definition is sort of unavoidable if you read files with mmap, though. Once the file is mapepd, you could scan it, like you would with read(), which should not use RAM for the whole file. Or you could treat it as if it were in RAM and read single bytes all over the place, which would cause thrashing if it weren't backed by RAM. There is no difference to the API that could easily be seen with static analysis. It's all about how the program runs. And even tools like 'cp' use mmap to read files, so you can't easily pretend this is some esoteric scientific computing question that us ordinary peasant sysadmins can ignore. so it's sort of awkward to define how much RAM an algorithm uses without running it under swap pressure. That doesn't convince me we need to use swap. I don't think it's well productionized because programs were never killed for OOM when they started thrashing. Thrashing is really a sharp line, different from "swap is making it slower," but I never used an integrated system that surfaced this line to the sysadmin, respected user- and process-isolation wrt this line, while with containers and VMs and balloon drivers we can sort of do those things now so long as there's no swap. I just want to point out that the modern world isn't actually cleaner than the old swapful world. It was really a pathetic admission of defeat that we didn't finish the work to characterize how much RAM an algorithm uses and isolate it under time sharing. idea #2: as an unmotivated datapoint, "these people seem to know what they're doing and have healthy irreverence," two modern systems I know about swap to zram (Chrome OS and one other), ie. they compress memory like "RAM Doubler" in the 80s. My guess is that's probably the right thing to be doing even though it sounds goofy to me. From anthony.elizondo at gmail.com Wed Mar 16 13:26:58 2022 From: anthony.elizondo at gmail.com (Anthony Elizondo) Date: Wed, 16 Mar 2022 13:26:58 -0400 Subject: [talk] Does swap still matter? In-Reply-To: References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: On Wed, Mar 16, 2022 at 12:27 PM Brian Cully wrote: > On 3/16/22 11:03, George Rosamond wrote: > > Today, when those 64G or more of RAM are the norm for bare-metal > boxes, and it's overkill in many contexts, is swap still necessary? > > Do certain applications/OS functions still use swap as opposed to RAM > for some reason? I mean, swap is normally encrypted by default, so > there is a justifiable reason to use swap over RAM. > > I don't use it on servers because I'd rather have things die than > incur a swap penalty if things start to get bogged down. To be fair, I > was also turning off swap in the 90s, when RAM was much tighter, for > the same reason. When things started to get hammered swap *always* > made the problem worse because now your disks are thrashing. > Seconding what Brian said. In search of greater reliability, it is preferable for a service to die completely rather than get slow (or, start exhibiting high tail latency). https://brooker.co.za/blog/2021/04/19/latency.html Some modern services flat out fail to run if swap is enabled. https://github.com/kubernetes/kubernetes/issues/53533 (To be fair, last year Kubernetes 1.22 did gain the ability to run with swap enabled). > I don't use it at home, either, because I have more than adequate > RAM on my home systems and don't see a need for it, and I value > consistent interactive performance. If I had substantially less RAM > I'd turn on swap to cover for bloated applications like web browsers, > or VMS I'm not actively using. > > Theoretically, swap can make your system faster because it allows > you to page out RAM that's been allocated and almost never used for > buffers. I don't know if there are systems that actually do this in > practice, though, and it opens you up to severe performance > degradation. Swap's always seemed to me like this thing that, in > theory, allows for more flexibility, but in practice is almost never > worth the trade offs. > > As far as swap being encrypted, I don't see that as much of a > reason to use over RAM. The keys to decrypt it still have to be in RAM > somewhere, and if you can arbitrarily read RAM, it doesn't seem like > it's much of a stretch to find the key and read whatever you want off > of swap. The value in on-disk encryption is when the system is off, > right? If it's on, and someone has the access to read your block > devices raw, then they can also read your key out of the kernel too, > right? Or has this changed in the advent of TPM and its ilk? > > -bjc > Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From okan at demirmen.com Wed Mar 16 13:59:04 2022 From: okan at demirmen.com (Okan Demirmen) Date: Wed, 16 Mar 2022 13:59:04 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: On Wed 2022.03.16 at 11:03 -0400, George Rosamond wrote: > This has been an on and off debate I've had with myself and others, and > wanted some input from others. Input from live experiences is great, input > from low-level devs is even better. > > When RAM never seemed adequate for a system in the past, the utility of swap > was obvious. You would see the spikes on top(1) when swap was hit. > > swap = 2 x RAM, blah blah. > > Today, when those 64G or more of RAM are the norm for bare-metal boxes, and > it's overkill in many contexts, is swap still necessary? > > Do certain applications/OS functions still use swap as opposed to RAM for > some reason? I mean, swap is normally encrypted by default, so there is a > justifiable reason to use swap over RAM. > > I know encrypted RAM is a (small) part of the universe today, including with > the Ryzen pro series. > > Looking forward to being enlightened. you don't like hibernate? From nonesuch at longcount.org Wed Mar 16 14:21:48 2022 From: nonesuch at longcount.org (Mark Saad) Date: Wed, 16 Mar 2022 14:21:48 -0400 Subject: [talk] Does swap still matter? In-Reply-To: References: Message-ID: <194C1D6D-ED1B-4CF5-9363-D9C8CBA11EF5@longcount.org> > > On Mar 16, 2022, at 1:28 PM, Anthony Elizondo wrote: > > Kubernetes Is utter garbage , it?s just a scam to get people to use the cloud . Don?t get me wrong some people absolutely love it and think it?s the only way to run their kit . I am a firm believer in less is more . K8s is the exact opposite; more is better , bigger and what you want . It?s too big to fail ? sure . Compressed pages (z-ram) is a cool idea in Linux and esxi have that reduce the need to swap inactive pages , it would be nice to see this ported / reimplement for a bsd . It can help in both low ram conditions and when physical resources are limited ( like in a embedded setup ) . --- Mark Saad | nonesuch at longcount.org From bcully at gmail.com Wed Mar 16 14:38:42 2022 From: bcully at gmail.com (Brian Cully) Date: Wed, 16 Mar 2022 14:38:42 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <194C1D6D-ED1B-4CF5-9363-D9C8CBA11EF5@longcount.org> References: <194C1D6D-ED1B-4CF5-9363-D9C8CBA11EF5@longcount.org> Message-ID: On Wed, Mar 16, 2022 at 2:22 PM Mark Saad wrote: > Compressed pages (z-ram) is a cool idea in Linux and esxi have that reduce the need to swap inactive pages , it would be nice to see this ported / reimplement for a bsd . It can help in both low ram conditions and when physical resources are limited ( like in a embedded setup ) . Depends on your embedded setup. A lot of projects put a high priority on predictability. You don't even allocate RAM because it means a potential run-time failure or arbitrary blocking. Better to just stick it all in the BSS so it won't even build or flash if you're using too much memory. Compressed memory isn't useful there. I know there are people working on embedded projects that use memory allocation, but I've never seen any of the projects. Is it stuff like robotics? Obviously environments like {micro, circuit}python require it as well, but I assume that's mostly used by hobbyists and educators. From jklowden at schemamania.org Wed Mar 16 14:48:07 2022 From: jklowden at schemamania.org (James K. Lowden) Date: Wed, 16 Mar 2022 14:48:07 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: <20220316144807.5bd47e1b72cc699b99d1158f@schemamania.org> On Wed, 16 Mar 2022 11:03:26 -0400 George Rosamond wrote: > Do certain applications/OS functions still use swap as opposed to RAM > for some reason? 1. Where does mmap MAP_ANON go? 2. I assume swap is necessary because Linux defaults to overcommitted memory. Because of that default, now a decade old at least, C libraries are being written to allocate gobs of memory that they'll never use. On systems without swap, that means real memory. Of course, you need *enough* swap. On the NetBSD system I was using, I think it was ndm that was the culprit. I don't remember anymore what I was doing, some webbish thing, ISTR. Died repeatedly in the middle of the night until I tracked it down. In case it's not obvious, swap that provides memory that is never used doesn't slow the system down, because it's never paged in. --jkl From bcully at gmail.com Wed Mar 16 15:37:11 2022 From: bcully at gmail.com (Brian Cully) Date: Wed, 16 Mar 2022 15:37:11 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <20220316144807.5bd47e1b72cc699b99d1158f@schemamania.org> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> <20220316144807.5bd47e1b72cc699b99d1158f@schemamania.org> Message-ID: On Wed, Mar 16, 2022 at 2:50 PM James K. Lowden wrote: > > On Wed, 16 Mar 2022 11:03:26 -0400 > George Rosamond wrote: > > > Do certain applications/OS functions still use swap as opposed to RAM > > for some reason? > > 1. Where does mmap MAP_ANON go? Nowhere. It waits for a page fault. > 2. I assume swap is necessary because Linux defaults to overcommitted > memory. Because of that default, now a decade old at least, C > libraries are being written to allocate gobs of memory that they'll > never use. On systems without swap, that means real memory. Nope. Linux overcommits because it doesn't actually allocate anything until a page fault occurs on the allocated memory region. I've even just tested this by allocating 64GiB on my swap-less Linux system. No extra memory was taken up because I never attempted to access that RAM region, so it never faulted, so it was never allocated. > Of course, you need *enough* swap. On the NetBSD system I was using, I > think it was ndm that was the culprit. I don't remember anymore what I > was doing, some webbish thing, ISTR. Died repeatedly in the middle of > the night until I tracked it down. Enough swap is 0 swap for a lot of us a lot of the time. > In case it's not obvious, swap that provides memory that is never used > doesn't slow the system down, because it's never paged in. The problems occur when swap does start to get used, and you can end up in disk thrashing loops as things have to constantly page in and out in order to make room for whatever RAM is necessary for the current working set. It definitely hurts a lot less to be constantly paging with NVMe drives than it did with spinning rust. But it still hurts, and I have more than enough scars from the spinning rust days that I turn swap off whenever I can. -bjc From justin at shiningsilence.com Wed Mar 16 16:23:27 2022 From: justin at shiningsilence.com (Justin Sherrill) Date: Wed, 16 Mar 2022 16:23:27 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: Just to make it weird, DragonFly has a mechanism that lets you use your small fast drives as swap for your large slow drives. This mattered more when SSDs were still tiny. https://man.dragonflybsd.org/?command=swapcache§ion=ANY I'm using the term a bit loosely to make the analogy seem better, I know. On Wed, Mar 16, 2022 at 11:06 AM George Rosamond < george at ceetonetechnology.com> wrote: > Do certain applications/OS functions still use swap as opposed to RAM > for some reason? I mean, swap is normally encrypted by default, so there > is a justifiable reason to use swap over RAM. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carton at Ivy.NET Wed Mar 16 17:18:56 2022 From: carton at Ivy.NET (Miles Nordin) Date: Wed, 16 Mar 2022 17:18:56 -0400 Subject: [talk] Does swap still matter? In-Reply-To: References: <194C1D6D-ED1B-4CF5-9363-D9C8CBA11EF5@longcount.org> Message-ID: <20220316211856.GB21747@castrovalva.Ivy.NET> > On Wed, Mar 16, 2022 at 2:22 PM Mark Saad wrote: > > Compressed pages (z-ram) is a cool idea in Linux and esxi > Depends on your embedded setup. A lot of projects put a high priority > on predictability. You don't even allocate RAM because it means a > potential run-time failure or arbitrary blocking. Better to just stick > it all in the BSS I don't think these never-call-malloc engine controller systems are the most helpful thing to add to the taxonomy because they are basically emulations of analog computers and not POSIX, though I see the analogy with a swapless non-overcommitted embedded system. They're like an extreme version of it with the same motivation! I think the question for POSIX world is whether RAM explosion failures can be isolated on the time-sharing system. Thrashing usually breaks process / user / jail isolation. overcommit + OOM-killing I think can sometimes be configured to preserve isolation. Something as simple as "kill the thing with the biggest RSS" is actually decent user- or process-isolation compared to thrashing. What about swap inside a VM guest, so the guest's RAM is limited, but the guest can swap? * virtual disk: may break isolation between VMs, if storage QoS is not good * zram: won't break isolation between VMs What about with containers instead of VMs? This can be almost arbitrarily flexible, with these "tree" schedulers that overcomplicated garbage like systemd or nice garbage like SMF sets up, where users are isolated from one another, from other instances of themslves (fork bomb on your X session? you can ssh in.), and processes within a user session are isolated from one another so each process gets an equal share of CPU and 1000-thread processes are not overserved. A system that can isolate at this level is superior to one that can only isolate VMs because it can do more "work conserving", more borrowing and sharing and stuff. Has anyone used zram with LXC? Can you set physical memory limits on the containers, and is zram paging accounted to container CPU limits? quick lmgtfy says, "yes, you probably can": https://github.com/lxc/lxd/issues/3337#issuecomment-303596914 If so zram may be able to preserve user isolation where traditional swap can't. but I'm not sure it is so. The difference: zram consumes only CPU, which can (theoretically? or actually?) be accounted to the page faulter and scheduled. Other swap mechanisms consume storage bandwidth which is often not accounted or scheduled, and if it somehow is it won't be with the full-fancy tree scheduler available for CPU scheduling, so it can turn into a user isolation breakdown. From pete at nomadlogic.org Wed Mar 16 17:26:16 2022 From: pete at nomadlogic.org (Pete Wright) Date: Wed, 16 Mar 2022 14:26:16 -0700 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: <5b0e0022-8b59-2fce-6f75-26379881d538@nomadlogic.org> On 3/16/22 08:03, George Rosamond wrote: > This has been an on and off debate I've had with myself and others, > and wanted some input from others. Input from live experiences is > great, input from low-level devs is even better. > > When RAM never seemed adequate for a system in the past, the utility > of swap was obvious. You would see the spikes on top(1) when swap was > hit. > > swap = 2 x RAM, blah blah. > > Today, when those 64G or more of RAM are the norm for bare-metal > boxes, and it's overkill in many contexts, is swap still necessary? i'll bust out the only true answer in engineering...it depends :) one use-case for swap for me personally is saving core dumps via safecore and friends on freebsd.? for this allocating a 2gb partition to swap is fine for my purposes. the anti-pattern would be on any production system where i *never* want to swap out anything for both performance and security reasons. it's funny though, i can't remember when i've had swap save me from a binary with run-away memory consumption in the past decade at least.? frankly by the time chrome/slack decide that it needs 3/4 of my 32gigs of ram it's game over anyway. ultimately i think if we had better OOMKiller functionality on linux, or better mechanisms in userland to manage and monitor memory over subscription and run-away processes in the general case, we could probably be done with swapping entirely. just my 2 bits, -pete -- Pete Wright pete at nomadlogic.org @nomadlogicLA From mmatalka at gmail.com Thu Mar 17 03:15:24 2022 From: mmatalka at gmail.com (Malcolm Matalka) Date: Thu, 17 Mar 2022 08:15:24 +0100 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: <86ee31oxmf.fsf@gmail.com> George Rosamond writes: > This has been an on and off debate I've had with myself and others, and wanted > some input from others. Input from live experiences is great, input from > low-level devs is even better. > > When RAM never seemed adequate for a system in the past, the utility of swap was > obvious. You would see the spikes on top(1) when swap was hit. > > swap = 2 x RAM, blah blah. > > Today, when those 64G or more of RAM are the norm for bare-metal boxes, and it's > overkill in many contexts, is swap still necessary? I have actually recently hit a case where I use swap: compiling some automatically generated code takes a lot of RAM and on my laptop and on the build infrastructure I use, it dips into using more RAM than I have and swap actually saves my butt. I don't do 2x RAM because I really just need like an extra gig or two to succeed. And getting a larger machine for my build setup currently is just not an option, unfortunately. So in that sense, swap is a life saver until I get the opportunity to address this issue another way. > > Do certain applications/OS functions still use swap as opposed to RAM for some > reason? I mean, swap is normally encrypted by default, so there is a justifiable > reason to use swap over RAM. > > I know encrypted RAM is a (small) part of the universe today, including with the > Ryzen pro series. > > Looking forward to being enlightened. > > g > > _______________________________________________ > talk mailing list > talk at lists.nycbug.org > https://lists.nycbug.org:8443/mailman/listinfo/talk From kmsujit at gmail.com Thu Mar 17 04:31:19 2022 From: kmsujit at gmail.com (Sujit K M) Date: Thu, 17 Mar 2022 14:01:19 +0530 Subject: [talk] Does swap still matter? In-Reply-To: <5b0e0022-8b59-2fce-6f75-26379881d538@nomadlogic.org> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> <5b0e0022-8b59-2fce-6f75-26379881d538@nomadlogic.org> Message-ID: On Thu, 17 Mar, 2022, 02:56 Pete Wright, wrote: > > > On 3/16/22 08:03, George Rosamond wrote: > > This has been an on and off debate I've had with myself and others, > > and wanted some input from others. Input from live experiences is > > great, input from low-level devs is even better. > > > > When RAM never seemed adequate for a system in the past, the utility > > of swap was obvious. You would see the spikes on top(1) when swap was > > hit. > > > > swap = 2 x RAM, blah blah. > > > > Today, when those 64G or more of RAM are the norm for bare-metal > > boxes, and it's overkill in many contexts, is swap still necessary? > > i'll bust out the only true answer in engineering...it depends :) > > one use-case for swap for me personally is saving core dumps via > safecore and friends on freebsd. for this allocating a 2gb partition to > swap is fine for my purposes. > > the anti-pattern would be on any production system where i *never* want > to swap out anything for both performance and security reasons. > Funny even IT might not know application is using swap. > > it's funny though, i can't remember when i've had swap save me from a > binary with run-away memory consumption in the past decade at least. > frankly by the time chrome/slack decide that it needs 3/4 of my 32gigs > of ram it's game over anyway. > > ultimately i think if we had better OOMKiller functionality on linux, or > better mechanisms in userland to manage and monitor memory over > subscription and run-away processes in the general case, we could > probably be done with swapping entirely. > > just my 2 bits, > -pete > > > -- > Pete Wright > pete at nomadlogic.org > @nomadlogicLA > > _______________________________________________ > talk mailing list > talk at lists.nycbug.org > https://lists.nycbug.org:8443/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From izaac at setec.org Thu Mar 17 14:11:07 2022 From: izaac at setec.org (Izaac) Date: Thu, 17 Mar 2022 14:11:07 -0400 Subject: [talk] Does swap still matter? In-Reply-To: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> References: <7e41922c-0b0a-fe65-a1c2-81291e5c4201@ceetonetechnology.com> Message-ID: <20220317T175645Z@localhost> On Wed, Mar 16, 2022 at 11:03:26AM -0400, George Rosamond wrote: > Looking forward to being enlightened. Paged virtual memory was a mistake. Dynamic linking (or shared objects in general) is unconscionable. It is an embarrassment that either of these technologies made it into the 21st century. -- . ___ ___ . . ___ . \ / |\ |\ \ . _\_ /__ |-\ |-\ \__