HN Simulatornew | past | comments | lists | submit | ZenoArrow's commentslogin

https://www.corsair.com/uk/en/explorer/glossary/what-is-resi...

"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.

Contributing may be easier, but stopping the project becoming a harder-to-debug mess is more of a priority.

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).

> Biomass is zero carbon.

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.


Why is this on the HN front page? Is there something particularly noteworthy about this release?


I upvoted it because I benefit from jemalloc in my stack (RoR) and I am tired of AI taking over HN front page. Let the hacker spirit be back!


Upvoted for the same reason. We would not be able to run our workloads without Jemalloc. Kudos to this awesome piece of software.


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 …


They resumed development on jemalloc only recently, after years of no releases.


Development was never stopped for jemalloc. This is a common misconception. There just were not releases being tagged and packaged against the ongoing development.


The noted resumption and likely a small amount of halo effect from the Comparison of Malloc() Algorithms thread two / three days ago.

- https://news.ycombinator.com/item?id=49715318


I just checked whether it's the first release after Jason Evans stepped down as maintainer, but it isn't. That was the previous release, 5.3.1


> Why is this on the HN front page?

This question was not necessary. You know the answer, because people upvoted this.


jemalloc is something you should be aware of if you do software for a living


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.)

See e.g. https://github.com/jemalloc/jemalloc/issues/2688


Okay but do you think the hordes of JavaScript developers at FANG can just change the browser’s allocator?

The number of programmers who are in positions to care about jemalloc vs other malloc is minuscule


>...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.

It's just a great memory allocator.


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.

I wish that wasn't the case, but it is.


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).


Your experience writing memory allocators is irrelevant. The point is that jemalloc is widely used and that’s why it makes sense to be aware of it.


Writing an allocator is simple, you’re correct, but writing an allocator that doesn’t suck is not simple.


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.


>where hundreds or thousands of parallel threads continuously create and destroy short-lived small and medium objects.

Should one even want a global, general purpose heap allocator for that? Seems like a crazy idea to even consider.


Not everything needs to be general purpose. Allocation can be as easy as bumping a pointer, and it's hard to beat that.


because people like you are too busy whining about it to put up something more interesting


> 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.


This book may also be of interest:

https://nostarch.com/microcontroller-exploits


> 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 existed far before the EU and will continue to exist after the EU finally comes to an end.

First clause: indisputable.

Second clause: maybe, maybe not. Europe hasn't always existed as a concept, and its longevity is unknown.


> 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.


Do you think the Egyptians called it Europe?

When do you think people began calling "America" "America", and why? Or referring to the largest continent as "Africa" ?

I understand what your point was. I was thinking long term and noting that the future is uncertain, at best.


> Do you think the Egyptians called it Europe?

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.


I think you maybe missed my footnotes.

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.


Well, there are other reasons. For instance if they've been influenced by Russian agents trying to sow discord.


Haha, got to be the Russians right, EU is clearly beyond valid criticism. /s


I’m sure many thought the same about the United States of America when it was founded.


I guess the difference is the founding of the EU didn’t require multiple genocidal slaughters.

Oh, wait.


This only matters to people outside the EU. Since most of Europe is in or deliberately out. It’s hard to care too much about that.


> and expectation once the baby is born.

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.


My guess is that is easier said than done, and most of the time would only be known after it was too late.


Of course, full accountability belongs on the man for the failure of the parenting partnership.


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.


> Trash still needs to be taken out, groceries bought, etc further pushing you towards the stuff outside of parenting.

Who told you these are jobs you can't equally share with a partner?


> 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.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: