"When a game is running, the CPU needs access to a graphic card’s memory, and by default it can only access 256MB at a time. However, resizable BAR removes the size limitation so the CPU has access to all of a GPU’s memory, theoretically allowing for improved performance. This adjustment lets the CPU request much larger chunks of data from the GPU, which can improve performance in games that can benefit from this change."
Yes, I'm aware of it. It's purely an addressing simplification and you are still limited by the GPU bus speed if you want to access any data on the GPU by the CPU. And it only works one way, the GPU cannot be given an address in RAM and expected to magically have access to it, the driver has to copy the data over first.
No, the "postmarketOS" name came about to indicate that it's an OS to keep older devices working for longer (i.e. providing active support after the support from the manufacturer has ended).
Not correct. Biomass includes burning wood from new growth forests. If the trees were kept in the ground they would be carbon sinks rather than carbon stores, therefore the overall effect is an increase in emissions. Furthermore, there's energy expended in prepping the wood (e.g. turning the trees into wood pellets ready to burn) and in transporting the wood to the biomass power station.
You are not alone - my first thought was 'oh, HN is trying to bring back the disappointed hackers'. All this AI hype over every little model update fart is so exhausting and boring …
Development was never stopped for jemalloc. This is a common misconception. There just were not releases being tagged and packaged against the ongoing development.
In the Before Times, the vast majority of software was written in garbage collected language where a working knowledge of the relative merits of C memory allocators is not useful or particularly relevant.
Why would the scads of people writing JavaScript, Java, python, go, rails, etc need to be aware of jemalloc?
Memory allocation behaviour has visible impact also for users of managed languages, and the behaviour of software for end users.
In our Python program, a bit of numpy processing of large pictures led to 100 GB not being returned to the OS by glibc's default allocator and the machine running out of memory shortly after. With jemalloc's reliable memory return settings, those problems disappear.
I'm in the same boat, I just switched to using it for Kavita, which only does some basic open Image -> Thumbnail to smaller size -> write to disk when importing new comics/books and on linux, memory could swell to 10GB and never get released. Switched to jemalloc and instantly memory stayed well below 1GB.
Generally yes, but the wording of "instantly" begs for the following pedantic remark:
This is controlled by jemalloc settings `dirty_decay_ms`, `muzzy_decay_ms`, and their interaction with `background_thread`.
`dirty_decay_ms` currently defaults to 10 seconds, so it's not that instant.
That is important e.g. for single-threaded programs that start other programs, such as my Python example: If it starts a subprocess before the 10 seconds elapse after `free()`, Python (and jemalloc) do not run, and get no chance to return memory to the OS.
In such cases, either enable `background_thread`, or set the `_decay_` values to `0` to ensure immediate return to the OS upon `free()`. (This costs some performance.)
>...the vast majority of software was written in garbage collected language
and even then recently it costed (us) quite a few months to blame JVM and later the default glibc memory allocator for running out native (not java heap memory) - had to exclude all possible native libs (zlib, zstd via jna), direct buffers, sockets, thread stacks and so on. Changing the malloc to jemalloc solved the issue, even though initially it was done for its debugging capabilities.
I'm never sure if I should be upset or happy when I've been debugging a problem for long enough that I finally decide to switch something out in order to improve visibility and that immediately solves the problem for entirely unexpected reasons. Particularly all the times when I couldn't readily discern why.
We changed to jemalloc first on a jvm service which we could never get to run in its kube memory limit. with jemalloc its been dead stable for years, and we made it the default for all jvm services
Because unfortunately, the runtimes belonging to all or at least most of those languages perform a lot better with jemalloc than with the system default.
TL;DR: Because the runtime of most GC:d languages uses malloc for its internal data structures.
I work for the runtime team of JPG @ Oracle. We use malloc in Hotspot, quite a lot actually! Providing your JVM with a good malloc can improve the performance of the runtime, both in terms of CPU and memory, by quite a bit.
I don't think you need the details, but it's good to be aware that some mallocs are better than others, and there are multiple of them. Being aware of jemalloc is a good way of being aware of the facts I just mentioned :-).
The vast majority of professional developers are not in a position where they can just swap out allocators willy-nilly. They take what they get, and write the code they're assigned to write on the platform the CTO or their product lead or whoever has decided upon.
Okay, well, I guess all I can say is that if you strive to be one of the developers who do get the chance to care about this stuff, then you should know this stuff :-).
Why? Writing a memory allocator is quite simple, and I'd argue that _everyone_ should write one from scratch for any kind of high performance application. It's also trivial to outperform general purpose allocators that have to satisfy countless constraints. I've written numerous special purpose mallocs that are a) both provably (formally) safer than the standard armada and b) significantly faster (>10x throughput).
I'd happily see performance, latency and stability of your allocators in massively multithreaded, long-living programs with workloads where hundreds or thousands of parallel threads continuously create and destroy short-lived small and medium objects.
Writing allocators for domain-specific access patterns is easy. Writing a general-purpose high performing, stable allocator with bounded P99 latency is hard.
Give your friend, Dunning–Kruger, some better pills to keep him from speaking through you.
You're correct, but his point is that you don't need to solve the generic problem. Solving the generic problem is very hard. Grug doesn't like solving hard problem. What does grug do? Solve five easy problems. Make an arena for the short-lived objects, reuse the objects, use generic multithreaded malloc for the rest. Grug happy.
I guess the point was that before you consider using a different allocator you should rule out a custom one.
And that's rather hard, because a general purpose allocator makes all decisions based only on the requested size. This is a very simple interface and such a tool is worth having. But a custom allocator can both bake in a specific scenario and provide more nuanced interaction.
>massively multithreaded, long-living programs with workloads where hundreds or thousands of parallel threads continuously create and destroy short-lived small and medium objects.
My first thought would be to use per thread pool allocators.
> but I won't be able to re-play the excellent version that I played through last year
Why not? The future of game preservation for games not distributed on disc is probably going to be based around hard disk images, with some kind of overlay filesystem mechanism to allow choosing between different games without relying on standard installations. Will it be legal? Probably not. Will it happen? I suspect it will.
> In Europe people generally use “Europe” and the EU interchangeably.
In Europe some people generally and incorrectly use "Europe" and the EU interchangeably. Europe existed far before the EU and will continue to exist after the EU finally comes to an end.
> Europe hasn't always existed as a concept, and its longevity is unknown.
Europe is the name of a continent. What reason(s) would there be to change the name of a continent?
In contrast, the EU is a trading block, set up to foster greater pan-European trading relations. It's not the only pan-European institution. For example, the Council of Europe ( https://en.wikipedia.org/wiki/Council_of_Europe ) is a separate pan-European institution, set up in 1946 which was before the EU or any of the predecessors of the EU, and amongst other projects was behind the formation of the European Court of Human Rights. I bring this up to highlight that we do not need the EU in order to have collaboration between European countries.
You haven't given any dates, but if you're talking about ancient Egypt, i.e. the Egypt before 0AD, then yes. The term "Europa" was used to refer to the continent around this time by the Greeks, and I don't see why Egyptian people wouldn't have picked up on a useful term they didn't have before.
Even if you did/did not, vernacular evolves. So at the time that you fervently hope the EU comes to its (clearly deserved, Mr Putin) end, I imagine people will be able to adapt their wrong speak and clearly incorrect thinking to ensure they adhere to the newspeak.
> at the time that you fervently hope the EU comes to its (clearly deserved, Mr Putin) end
I find it funny you think the only reason people would want the end of the EU is if they're a Russian agent. The EU has very little to do with defence. Perhaps your argument would hold more weight if talking about NATO, but even then it's not necessary for countries to be members of NATO in order to collaborate on protection when their collective security interests align.
This can be resolved by choosing a better man as a partner, one that is supportive and willing to be an equal partner. I understand finding someone that fulfills that as well as this person also being someone you're attracted to and compatible with socially is challenging, but I have seen relationships like this before so I know it's possible.
This cannot be resolved, you will not be an equal parent or even close to it the first few months, maybe even over a year. Breast feeding and various dependencies that develop (like that the kid wants to fall asleep at the breast) mean that most of the effort of parenting early falls on the mother.
And then there's the fact of life that other stuff needs to be taken care of. Trash still needs to be taken out, groceries bought, etc further pushing you towards the stuff outside of parenting.
This can hardly be resolved with money. We could hire nannies, get the top nursery, whatever. It would even be cost-efficient if it let mom work. However, the kid doesn't want to be without his mom and much more so she doesn't want to be away from him for a longer time! Even with me 4-6 hours is about it.
Very few men lactate, that is absolutely true. However, in our family it is the mother who has the drive and career ambitions, which is why the child has fallen asleep on the father instead, including when said child was but a few months old and the mother had a six-week business trip abroad.
I am sure children benefit from having several parents and role models, but I am not so sure that the shape of the genitals matter as much as whether the parent(s) is/are emotionally in tune with the child. The classical father of yore was simply not much of a parent. Today's can choose either.
That is true for a few months. You have children for rather longer than that. Even with breast feeding you can express the milk. I did that. I used to work from home with my younger daughter asleep in a sling.
Your child might want the mother, but this is no true of every child. Different kids in the same family can be different in this way too.
> I don't understand why they don't just hold another referendum and undo everything.
I see you follow the EU model of democracy; keep putting matters up for a vote until you get the result you want.
Despite what you may have been led to believe, there's still a substantial number of British people that reject EU membership, and this goes beyond the "racist" and "economically illiterate" arguments that remainers typically fall back on. I would suggest you do what your predecessors did not and consider the consequences of losing.
"When a game is running, the CPU needs access to a graphic card’s memory, and by default it can only access 256MB at a time. However, resizable BAR removes the size limitation so the CPU has access to all of a GPU’s memory, theoretically allowing for improved performance. This adjustment lets the CPU request much larger chunks of data from the GPU, which can improve performance in games that can benefit from this change."
reply