News for hackers. Stuff that matters.
Re:Swift at Apple: Migrating the Password Monitoring Service... by mpweiher on Tuesday June 03, 2025 @05:59PM (#44175234)
With the 90% reduction in memory consumption, I'd wager that most if not all the performance improvement came from that. In fact, it is a little surprising that hardware utilization only dropped 50%.

Reduced memory consumption for cloud applications was apparently also the primary reason IBM was interested in Swift for a while. Most cloud applications apparently sit mostly idle most of the time, so the number of clients you can multiplex on single physical host is limited by memory consumption, not CPU throughput.

And Java, with the JIT and the GC, has horrible memory consumption.

Re:Swift at Apple: Migrating the Password Monitoring Service... by conradev on Tuesday June 03, 2025 @07:43PM (#44175947)
This is why serverless is taking off on the opposite end of the spectrum (and why it’s so cheap)

You can share memory not only at the machine level, but between different applications.

Re:Swift at Apple: Migrating the Password Monitoring Service... by dgs_sgd on Tuesday June 03, 2025 @06:25PM (#44175439)
Interesting. If IBM was trying to solve for memory consumption, why do you think they picked Swift over alternatives that might also have achieved lower memory consumption?
Re:Swift at Apple: Migrating the Password Monitoring Service... by dagmx on Tuesday June 03, 2025 @07:22PM (#44175828)
Swift is at a good middle ground of performance, safety and ease of use.

It has higher level ergonomics that something like rust lacks (as much as I like rust myself), doesn’t have many of the pitfalls of Go (error handling is much better for example) and is relatively easy to pickup.

It’s not perfect by any means, it has several issues but it’s quickly becoming my preferred language as well for knocking out projects.

Re:Swift at Apple: Migrating the Password Monitoring Service... by ngcc_hk on Thursday June 05, 2025 @05:39PM (#44196047)
What are those issues I wonder. I used for one project and not sure how deep the rabbit hole might be. Just wonder.
Re:Swift at Apple: Migrating the Password Monitoring Service... by tgma on Wednesday June 04, 2025 @02:15AM (#44177692)
Which other sufficiently popular modern language that's more efficient than Java lacks a tracing GC?

Rust and Swift are pretty much the only two choices and Rust is arguably much more pain in the ass for the average joe enterprise coder.

Re:Swift at Apple: Migrating the Password Monitoring Service... by tgma on Wednesday June 04, 2025 @02:53AM (#44177861)
IBM is a huge and quite balkanized company and I don't think there was ever a centralized push towards Swift outside some excited parties. With that, I would note that circa 2018 there was a DRAM shortage in the industry and people started thinking more about memory conservation in datacenter workloads.
Re:Swift at Apple: Migrating the Password Monitoring Service... by eosterlund on Wednesday June 04, 2025 @11:13AM (#44181578)
The thing about DRAM is that it isn't SRAM; cost matters. You struggle to find deployment environments that have less than 1 GB DRAM available per core, because at that point, ~95% the HW cost is typically CPU anyway. Shrinking that further is kind of pointless, so people don't do it. Hence, when utilizing 16 cores, you get at least 16 GB DRAM that comes with it, whether you choose to use it or not. If you use only 10% of that memory by removing the garbage from the heap, then while lower seems better and all that, it's not necessarily any cheaper in actual memory spending, if both fit within the same minimum 1 GB/core shape you can buy anyway. It might just under utilize the memory resources you paid for in a minimum memory per CPU shape, which isn't necessarily a win. Utilizing the memory you bought isn't wasting it.

Each extra GB per core you add to your shape, actually costs something. Hence every GB/core that can be saved results in actual cost savings. But even then, usually every extra GB/core is ~5% of the CPU cost. Hence, even when going from 10 GB/core (sort of a lot) to 1 GB/core, that only translates to ballpark ~50% less HW cost. Since they did not mention how many cores these instances have, it's hard to know what GB/core were used before and after, and hence whether there were any real cost savings in memory at all, and if so what the relative memory cost savings might have been compared to CPU cost.