Readit News logoReadit News
longcommonname commented on Is parallel programming hard, and, if so, what can you do about it? [pdf]   mirrors.edge.kernel.org/p... · Posted by u/eric_khun
dragontamer · 3 years ago
1. Try process level I/O, such pipes, sockets, and the like. Have Linux deal with the concurrency problem, not you. (Note: the BASH & background job works in so many cases it ain't funny). Also try fork/join parallelism models like OpenMP. These are all far easier than dipping down to a lower level.

2. Try a mutex

3. If that doesn't work, try adding a condition variable.

4. If that still doesn't work, try an atomic in default sequentially consistent mode or equivalent (ex: Java volatile, InterlockedAdd, and the like). Warning: atomics are very subtle. Definitely have a review with an expert if you are here.

5. If that still doesn't work, consider lock free paradigms. That is, combinations of atomics and memory barriers.

6. If that still doesn't work, publish a paper on your problem lol.

---------

#1 is my most important piece of advice. There was a Blender render I was doing, like 2.6 or something old a few years ago. Blenders parallelism wasn't too good and only utilized 25% of my computer.

So I ran 4 instances of headless Blender. Bam, 100% utilization. Done.

Don't overthink parallelism. It's stupid easy sometimes, as easy as a & on the end of your shell command.

longcommonname · 3 years ago
Level 0. Use infra like kafka, and eventing to replicas.
longcommonname commented on How to handle serverful resources when using ephemeral environments   theburningmonk.com/2023/0... · Posted by u/kiyanwang
don-code · 3 years ago
The author differentiates between "serverful resources", like RDS and OpenSearch clusters, and "things that should be a platform team's responsibility", like VPCs.

I'm currently running a shared RDS cluster, for instance, that's used in a platform capacity. Workloads are isolated from each other; there's a clear pipeline for my team and others to update it; and the eventual goal is to build out monitoring to make it evident which workloads are putting stress on the system, so that the owners can respond. We chose this architecture to save on infrastructure costs, at the expense of marginally higher operational costs, as we explicitly wanted to avoid a proliferation of tiny RDS clusters with each new service. The expectation is that the higher operational cost will ultimately be lower than what infrastructure costs would be.

longcommonname · 3 years ago
I've found the exact opposite. We have lots of gcp cloudsql instances. Each team handles their own dbs for however they decide to split their services.

Our operational costs are more distributed, they are more but they indicate the cost of each product and they separate our data very well.

Teams can do their own migrations, and we can prevent some rogue service from violating the data.

We are currently in progress for a very large migration from what you have. But I'm sure we just did it wrong.

longcommonname commented on Tesla Fires Dozens at GigaFactory After Tuesday's Unionization Announcement   theverge.com/2023/2/16/23... · Posted by u/ninjagoo
longcommonname · 3 years ago
Wonder what this means for the tax implications and if it puts them below the threshold that they agreed to employ.
longcommonname commented on A little bit of slope makes up for a lot of Y-intercept (2012)   gist.github.com/gtallen11... · Posted by u/mooreds
moffkalast · 3 years ago
> That's good news for all of you people because you're in Stanford and that means you learn really, really fast.

> Personally I don't think that's a very good way to hire. The people who are doing the same thing over and over again often get burnt out and typically the reason they're doing the same thing over and over again is they've maxed out.

Anyone else who feels like they haven't learned a thing in their field of work since they left university?

Once you get hired for and do what you're good at while there's nobody else at the company you can learn from it just feels like gradual regressing.

longcommonname · 3 years ago
Absolutely not. I have learned all sorts of things. But I have to seek them out.
longcommonname commented on I Thought I Was Saving Trans Kids. Now I’m Blowing the Whistle   thefp.com/p/i-thought-i-w... · Posted by u/jtbayly
longcommonname · 3 years ago
More research should be done around detransitioners. Doctors need to evaluate the whole patient and in the case of informed consent they should confirm that the patient is aware of all the potential changes.

That being said, gate keeping what I do with my body is wrong. I knew all the potential side effects when I transitioned. I read the wpath in full. I was comfortable with all the risks.

This type of critical judgment of children's health care is needed and I hope the doctors are being more rigorous than what the author suggests.

I feel terrible for the girls who made a decision they regret and lost parts of their body that made them happy. Their doctors, and parents failed them. I am also happy that so many people were able to successfully transition.

The timing of the article is concerning with so many states trying to withhold life saving care I worry that the nuance of this article will be lost.

longcommonname commented on Go and SQLite in the Cloud   golang.dk/articles/go-and... · Posted by u/subomi
markusw · 3 years ago
Hey! I'm the author of the article. Saw a sudden influx of traffic from HN and found the post here.

Happy to answer any questions. Although SQLite is so dead-simple-but-awesome that you probably don't have any. :D

Anyway, hope you enjoy it and learn a thing or two.

Markus

longcommonname · 3 years ago
Would you provide a summary of how you noticed the increased traffic and how you found this post?
longcommonname commented on Disney says it has more streaming customers than Netflix   cbsnews.com/news/disney-s... · Posted by u/lxm
longcommonname · 3 years ago
Disney is primarily an entertainment company and focuses on users enjoyment.

Netflix is now an ad/ tech company.

longcommonname commented on Cook shortage threatens to sink U.S. Coast Guard operations   forbes.com/sites/craighoo... · Posted by u/CaliforniaKarl
shagie · 3 years ago
The culinary degree is not the short order scramble eggs type cook (and my apologies to short order cooks reading this - I know you do a lot more than that).

A culinary degree also covers food safety, nutrition, sanitation, menu planning, a bit of accounting (purchasing, inventory, storage), and other topics.

https://sealiftcommand.com/departments/culinary/chief-cook/2...

This isn't a four year STEM bachelors degree, but you want to make sure you have someone who isn't mixing utensils, going short on provisions, or spoiling food.

longcommonname · 3 years ago
I am a trained military lab tech, military chef and I now do computer things as a civilian.

My military training included all those things. When you are feeding a war / humanitarian effort / training you have very little budget to provide a meal that hundreds will want to enjoy in a safe manner.

Don't minimize the knowledge/ effort required to do this.

longcommonname commented on New evidence shows water separates into two different liquids at low temperature   birmingham.ac.uk/news/202... · Posted by u/voisin
mikewarot · 3 years ago
Evidence comes from experiments, not simulations. You don't get to overload the word "evidence" in this way, not on my watch.

A model can't produce evidence, it can only predict its possibility, and give hints to the experimenter on where to find it.

longcommonname · 3 years ago
Models based on our understanding of the world provide a level of certainty lower than experimentation but still scientifically valid.

Discoveries are often statistical in their nature about how uncertain the are.

longcommonname commented on Ask HN: Why do some companies build their own CICD orchestrators?    · Posted by u/dev_0
theamk · 3 years ago
Checkpoint is a deploy system, not a CICD. A quick Google finds a nice description of it: https://slack.engineering/deploys-at-slack/

That said, once you step away from webapp world, a lot of times all existing CI/CD systems are pretty terrible. For example we have pre-merge tests that need a few tens of cpu-hours spread across a dozen machines, and running natively (no docker). This rules out pretty much every CI/CD system out there except Jenkins and Buildkite, and both of them a pretty horrible at it unless you spend lots of time with custom scripts. At some point it will become easier to rewrite entire system rather than try to fight existing one.

longcommonname · 3 years ago
This is possible with github actions. Have one job create a matrix of other jobs for each of your runners.

Use self hosted runners if you are worried about costs or have special requirements.

u/longcommonname

KarmaCake day274March 1, 2018View Original