138
Single Threaded Workload (lemmyonline.com)

Yup. always gotta be that one single threaded program. In this case, appears to be frigate.

you are viewing a single comment's thread
view the rest of the comments
[-] deleted@lemmy.world 18 points 11 months ago

It’s mildly infuriating tbh but I understand it’s hard to implement threading for some functions.

What actually infuriates me more is some AAA titles that specifically utilize 4 threads of my 3950x 32 threads cpu.

[-] vext01@lemmy.sdf.org 12 points 11 months ago

Programming with threads is much harder than using a single thread.

First your workload has to be split up in such a way that it can be distributed. That's not always possible.

The you gotta insert "synchronisation" to avoid a whole class of concurrency issues.

Hence programmers always default to a single thread unless really needed.

[-] shadowbert@kbin.social 7 points 11 months ago

Of course - I get that. I'm a programmer myself.

But it does have to be said that there's little excuse for not doing it anymore for heavy applications, especially games. The tools/frameworks/engines have vastly improved, and people know (at least roughly) ahead of time what work is going to slog the CPU, especially in the case of a AAA studio.

Note: I'm only referring to relatively modern games here - anything that's older than when multithread really took off gets an automatic pass - it's not reasonable to expect someone to cater for a situation that doesn't exist yet.

[-] vext01@lemmy.sdf.org 5 points 11 months ago

Tend to agree that these massive studios should have the resources.

[-] douglasg14b@lemmy.world 0 points 11 months ago* (last edited 11 months ago)

there's little excuse for not doing it anymore for heavy applications, especially games

.... Wut. You chose one of the best examples of where multi-threaded workloads are extremely difficult and often impractical as your example of where it should definitely be used...? 🤦

Games are where it's the most difficult, nevermind enterprise workloads that can be multi-threaded on paper, while games can often not even make that work in theory. Game workloads are incredibly, almost insurmountably, difficult to multi-threaded for most teams and studios.

Not just from a technical standpoint but from a practical standpoint as well as you are significantly increasing the surface area for software defects, full of pitfalls and gotchas. Sure you can multi-thread your workload but now it actually runs slower than it would have if you never did this at all due to increased resource usage as a result of synchronization...etc

Games like factorio are rarities, where the developers had both a small game and scope, and all the time and resources they needed to produce multi-threaded solutions to their workloads. Engines like unity have ECS, which has limitations of use and comes with extra asterisks. But outside that and a few other examples actual multi-threading is a massive undertakings that may actually mean your Game cannot be delivered.

[-] shadowbert@kbin.social 1 points 11 months ago

Difficult, yes. Impractical? Absolutely not, at least with some planning ahead. It's not trivial (and I never said it was) but it's getting both easier and more important every year.

load more comments (7 replies)
load more comments (12 replies)
this post was submitted on 27 Jul 2023
138 points (97.3% liked)

Selfhosted

37771 readers
322 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS