Ticketing people who don’t pay for parking is “bullying?”
This is pretty insulting to people who have actually suffered from real bullying. There’s plenty of real problems in the world to be righteously angry about. Maybe let’s not post shitty Facebook memes on Lemmy.
It’s meter cops who camp on your car in case your meter runs out before you make it back, so they can give you a full ticket for one second of “stolen parking”, you physicality thief, you.
I manage a machine that runs both media transcodes and some video game servers.
The video game servers have to run in real-time, or very close to it. Otherwise players using them suffer noticeable lag.
Achieving this at the same time that an ffmpeg process was running was completely impossible. No matter what I did to limit ffmpegs use of CPU time. Even when running it at lowest priority it impacted the game server processes running at top priority. Even if I limited it to one thread, it was affecting things.
I couldn’t understand the problem. There was enough CPU time to go around to do both things, and the transcode wasn’t even time sensitive, while the game server was, so why couldn’t the Linux kernel just figure it out and schedule things in a way that made sense?
So, for the first time I read up on how computers actually handle processes, multi-tasking and CPU scheduling.
As FFMPEG is an application that uses ALL available CPU time until a task is done, I came to the conclusion that due to how context switching works (CPU cores can only do one thing, they just switch out what they do really fast, but this too takes time) it was causing the system to fall behind on the video game processes when the system was operating with zero processing headroom. The scheduler wasn’t smart enough to maintain a real-time process in the face of FFMPEG, which would occupy ALL available cycles.
I learned the solution was core pinning. Manually setting processes to run on certain cores of the CPU. I set FFMPEG to use only one core, since it doesn’t matter how fast it completes. And I set the game processes to use all but that one core, so they don’t accidentally end up queueing for CPU time on a core that doesn’t have the headroom to allow the task to run within a reasonable time range.
This has completely solved the problem, as the game processes and FFMPEG no longer wait for CPU cycles in the same queue.
I think the difference is simply that most processes only have a certain amount that needs accomplishing in a given unit of time. As long as they can get enough CPU time, and do so soon enough after getting in line for it, they can maintain real-time execution.
Very few workloads have that much to do for that long. But I would expect other similar workloads to present the same problem.
There is a useful stat which Linux tracks in addition to a simple CPU usage percentage. The “load average” represents the average number of processes that have requested CPU time, but have to queue for it.
As long as the number is lower than the available number of cores, this essentially means that whenever one process is done running a task, the next in line can get right on with theirs.
If the load average is less than the number of cores available, that means the cores have idle time where they are essentially just waiting for a process to need them for something. Good for time-sensitive processes.
If the load average is above the number of cores, that means some processes are having to wait for several cycles of other processes having their turn, before they can execute their tasks. Interestingly, the load average can go beyond this threshold way before the CPU hits 100% usage.
I found that I can allow my system to get up to a load average of about 1.5 times the number of cores available, before you start noticing it when playing on one of the servers I run.
And whenever ffmpeg was running, the load average would spike to 10-20 times the number of cores. Not good.
That makes complete sense - if you’ve got something ‘needy’, as soon as it’s queuing up, I imagine it snowballs, too…
10-20 times the core count is crazy, but I guess it’s had a lot of development effort into parallelizing it’s execution, which of course goes against what your use case is :)
Theoretically a load average could be as high as it likes, it’s essentially just the length of the task queue, after all.
Processes having to queue to get executed is no problem at all for lots of workloads. If you’re not running anything latency-sensitive, a huge load average isn’t a problem.
Also it’s not really a matter of parallelization. Like I mentioned, ffmpeg impacted other processes even when restricted to running in a single thread.
That’s because most other processes will do work in small chunks that complete within nanoseconds. Send a network request, parse some data, decode an image, poll HID device, etc.
A transcode meanwhile can easily have a CPU running full tilt for well over a second, working on just that one thing. Most processes will show up and go “I need X amount of CPU time” while ffmpeg will show up and go “give me all available CPU time” which is something the scheduler can’t actually quantify.
It’s like if someone showed up at a buffet and asked for all the food that no-one else is going to eat. How do you determine exactly how much that is, and thereby how much it is safe to give this person without giving away food someone else might’ve needed?
You don’t. Without CPU headroom it becomes very difficult for the task scheduler to maintain low system latency. It’ll do a pretty good job, but inevitably some CPU time that should have gone to other stuff, will go the process asking for as much as it can get.
It was quite a while ago that I had heard the majority of internet traffic is from bots. I can imagine it’s significantly worse now, especially with publicly available AI bots.
I’m not huge or athletic but I probably weigh, like, twice as much as a goose. I get that they’re incredibly pissy and they have teeth and pointy bits, but I’m still betting on me.
In this context I think we have to assume life or death tactics by both combatants.
But that’s an important distinction because MOST of the time we deal with pissed off animals that we don’t want to hurt, much less kill. So that gives some animals a big advantage in real world encounters. Maybe most adults could kill a goose if they had to, but in real life 99% of adults are going to back off or run away rather than deal with a fucking goose!
Punt to the chest. Bird bones are papier mâché. Never get in a fist fight with a goose, their wings will break your arms. Definitely don’t try and snap its spindly little neck. Just kick it in the chest
Pine64, the company that has made such excellent projects as the PinePhone, PineBook, and PineTime(open source hardware and software smartphone, laptop and smart watch), has stated that one of their dream projects would be an open source, hackable printer. There’s obviously a ton of logistics though and it will likely never materialize unless they really start making big bucks.
I actually agree with “the slog of our day to day lives is making us unproductive” but I think the cause is depression at a societal level. I can barely get myself to do anything outside of work, when I get home I am absolutely drained and it kills me inside. I want to accomplish things but I just can’t.
I hate we’re going through this, but it does help to know I’m not alone. I try, I really do. I am near done with grad school and work full time, but in my free time I’m too drained to do much more than just zone out for hours.
I’ve realized that there are lots of ways societies can become great, but they all involve discipline. The people as a whole need to be trusted to show up when they say they will, not steal things as soon as they can, and actually do the things they’re tasked with.
I have basically zero personal discipline, which is a pretty big problem for me personally, but I think it’s even worse for a society. If I stay in bed instead of doing homework or going to work, I might flunk or get fired. If I steal from my job or pretend to work while half assing it, I get fired and/or arrested. If everyone does it, we can’t individually punish everyone, we just either have a less reliable society, which leads to decreased social trust, or we have different social and legal requirements for different classes of people, which has not been working out great so far.
I guess what I’m saying is, if capitalism by default drains people of their initiative and discipline, maybe it’s just not a very effective system.
But someone who has passed econ 101 will tell you that capitalism is great, has no issue, solves every problem and we’re wrong because we’re not formally educated.
I found out I can access the local bar’s TouchTones from my house and my work. So on random evenings, I’ll queue a song list up starting with Photograph (my calling card), then do a list of bizarre songs (Surfin’ Bird, it’s Not Unusual, a 20+ minute Sufjan Stevens song, Babymetal, etc), then close it out with Photograph again.
I’m going to give the bartender a Pavlovian response to hearing Nickelback
So, from experience, I don’t think it likes it if you play a song too close to itself. I had a short Playlist once with two or three songs bookended with Photograph, and it dropped the second Photograph. So I’m hesitant to do the same song over and over. Maybe a song that has a whole bunch of different versions might work!
Dunno about anyone else but personally: I don’t care because I can’t afford food each month. Worrying where your next meal comes from focusing your mind somewhat.
I’m not even sure how to define how self-satirical it is that they made a monument to the political victims of repression, which is now where they authorize any kind of demonstration if one is ever allowed, and it’s also the spot where they arrest everyone. It’s straight out of a joke.
Unfortunately it’s a photoshopped picture. Notice that the items have mismatched sizes. It was made about 6-7 years ago.
That’s all there is to the story of this picture. There are actually no “cute semi naked skater chicks willing to get drunk and browse the internet in candlelight” in the local drainage pipes near you.
Always weird to be reminded that the World’s eminent superpower is obsessed with cutting bits off babies’ dicks. But then, maybe that’s the secret behind their economic strength?
After all, the Romans did some pretty wild stuff, like making their horses generals.
lemmy.world
Top