this post was submitted on 27 Jul 2023
140 points (97.3% liked)

Selfhosted

38768 readers
104 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
 

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

top 42 comments
sorted by: hot top controversial new old
[–] [email protected] 24 points 1 year ago (1 children)

Multithreading is almost impossible with only a few cores. It is barely enough to run Windows πŸ₯Ί

You should upgrade soon ☝🏻

[–] [email protected] 11 points 1 year ago (2 children)

I know, it's horrible.

Although, I really need to get this machine added into my proxmox cluster. My cluster really does need more resources....

But, my good old unraid box just "works"... so, I don't wanna touch it lol

[–] [email protected] 6 points 1 year ago (1 children)

Can it run crysis? πŸ€”πŸ˜Έ

[–] [email protected] 4 points 1 year ago (2 children)

Of course. Can also run cyberpunk!

[–] [email protected] 2 points 1 year ago (1 children)

What about wolfenstein 3d?

[–] [email protected] 1 points 1 year ago (1 children)

Well, it can run doom(in dosbox), and doom proceeded wolfenstein.

[–] [email protected] 1 points 1 year ago

how about moonbuggy?

[–] [email protected] 1 points 1 year ago

😳😳

[–] [email protected] 1 points 1 year ago (1 children)

I moved my unraid box into a vm on my proxmox server so that I could share the rest of the resources on the unraid server. I haven't had any issues so far and have the benefit of being able to create other vms on that server too

[–] [email protected] 2 points 1 year ago

I have been really toying with the idea of doing so.

I just need to slap a new HDD in there for proxmox itself though.

[–] [email protected] 18 points 1 year ago (3 children)

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.

[–] [email protected] 12 points 1 year ago (3 children)

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.

[–] [email protected] 7 points 1 year ago (2 children)

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.

[–] [email protected] 5 points 1 year ago

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

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] [email protected] 2 points 1 year 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.

[–] [email protected] 6 points 1 year ago

Programmers mostly don't know how to make multithread programs.

[–] [email protected] 3 points 1 year ago (1 children)

I’m programmer myself and I understand that it’s not simple even though you can use blocking or protected collections.

I’m referring to a situation where the programmer made a function multithreaded but hard coded creating only 4 threads β€œto fully utilize a 4 core cpu”

[–] [email protected] 6 points 1 year ago (2 children)

Multithreading in games is much more difficult because you not only have to make sure, everything is synchronized, but also that everything finishes in time. It's a bit like a RTOS in that regard. Using a known and fixed amount of threads can be a sane choice.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Yup, glad someone else understands that one.

Not much of a game developer myself- but, yea, I understand the challenges of multithreading, especially around the main loop.

If you want to learn something interesting, check out a few videos on the PS2 architecture, and the challenges around optimizing games for it. Its, very interesting.

https://www.youtube.com/watch?v=IRv_xKS4q7o

Oh, and the PS3 wasn't any better. (Worse in ways..)

https://www.youtube.com/watch?v=zW3XawAsaeU

[–] [email protected] 2 points 1 year ago

Here is an alternative Piped link(s): https://piped.video/watch?v=IRv_xKS4q7o

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source, check me out at GitHub.

[–] [email protected] 0 points 1 year ago

Not always true. Not for all games. And multiplayer games already have multithreading in some way.

[–] [email protected] 3 points 1 year ago

I know your pain. Although, my gaming PC is only rocking a Ryzen 7 5800x. Not, nearly as many threads... but, there are a ton of games which are only using a small fraction of the available CPU.

If I recall, Assassins' creed was pretty bad about it.... Minecraft (Especially modded) was horribly single threaded. And- more.

[–] [email protected] 3 points 1 year ago (1 children)

Heh. Classic case of being able to market your product as being "multithreaded" because is uses 2 threads? :P

[–] [email protected] 3 points 1 year ago (1 children)

"The garbage collector runs in a second thread! This means we're fully multithreaded now! Ship to customer and advertise multithreading!"

[–] [email protected] 1 points 1 year ago (1 children)

No shit. You got garbage collection?

It’ll be sold out in beta aka test in production.

[–] [email protected] 1 points 1 year ago

test in production

One of the teams in the corporation I work for even develops in production.

[–] [email protected] 15 points 1 year ago (1 children)

Unraid appreciation comment!

[–] [email protected] 5 points 1 year ago

It's hard not to like, it just works!

[–] [email protected] 10 points 1 year ago (1 children)

Nah, with just 8% of CPU load, you can't possibly have a CPU bottleneck...

[–] [email protected] 2 points 1 year ago (1 children)

Oh, no bottleneck.

But, just found it interesting out of the 64 threads on this box.... there is typically one maxed out.

[–] [email protected] 1 points 1 year ago (1 children)

Oh, I was just trying to make a joke. It's not a serious commentary.

[–] [email protected] 3 points 1 year ago

Apologies then, its harder to sense sarcasm here on lemmy... when people are 100% serious about going around and vandalizing cars, because people have them.... (Not- joking...)

[–] [email protected] 5 points 1 year ago (1 children)

Getting a coral TPU should massively improve that. Worth the $$ imo

[–] [email protected] 3 points 1 year ago (1 children)

I have two of them, in that case.

I have a lot of cameras, being recorded.

[–] [email protected] 2 points 1 year ago (1 children)

Considering I have 8 HD cameras and my coral is barely breaking a sweat. wow.

Have you tried lowering the detection framerate?

[–] [email protected] 2 points 1 year ago

Its not the detection process using CPU.

but, rather, gortc.

[–] [email protected] 2 points 1 year ago (1 children)

Xeon gang in the house. I picked up an HPE with an E5-2650 v4 on eBay with 64GB memory and some spinning disks for $180. Best investment I have made. It’s the z640 tower so pretty quiet and doesn’t need a rack. Core count has made my life a whole lot easier.

[–] [email protected] 2 points 1 year ago (1 children)

My only complaint, when I doubled my ram from 128g to 256g of ddr4... it added another 100w of power usage. :-(

[–] [email protected] 3 points 1 year ago (2 children)

Surely there's no way that's just the ram... did you also double your workload or something?

[–] [email protected] 2 points 1 year ago

A possible explanation is that the new ram sticks requires another memory channel to be active

[–] [email protected] 2 points 1 year ago

Every ddr4 ram module (8g of ram), uses around 3w. I have 256g of it.

That is 32 modules * 3 = 96 watts.

From Crucial: https://www.crucial.com/support/articles-faq-memory/how-much-power-does-memory-use#:~:text=As%20a%20rule%20of%20thumb,the%20voltage%20beyond%20XMP%20settings.

This is also ECC server ram, might be safe to say, it takes a bit more too.

load more comments
view more: next β€Ί