Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ Balancing work on GC threads

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Balancing work on GC threads


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: devblogs.microsoft.com

In Server GC, each GC thread will work on its heap in parallel (that's a simplistic view and is not necessarily true for all phases but on the high level it's exact the idea of a parallel GC). So that alone means work is already split between GC threads. But because GC work for some stages can only proceed after all threads are done with their last stage (for example, we canโ€™t have any GC thread start with the plan phase until all GC threads are done with the mark phase so we donโ€™t miss objects that should be marked), we want the amount of GC work balanced on each thread as much as possible so the total pause can be shorter, otherwise if one thread is taking a long time to finish such a stage the other threads will waiting around not doing anything. There are various things we do in order to make the work more balanced. We will continue to do work like this to balance out more.

Balancing allocations

One way to balance the collection work is to balance the allocations. Of course even if you have the exact same amount of allocations per heap the amount of collection work can still be very different, depending on the survival. But it certainly helps. So we equalize the allocation budget at the end of a GC so each heap gets the same allocation budget. This doesnโ€™t mean naturally each heap will get the same amount of allocations but it puts the same upper limit on the amount of allocations each heap can do before the next GC is triggered. The number of allocating threads and the amount of allocation each allocating thread does are of course up to user code. We try to make the allocations on the heap associated with the core that the allocating thread runs on but since we have no control, we need to check if we should balance to other heaps that are the least full and balance to them when appropriate. The โ€œwhen appreciateโ€ requires some careful tuning heuristics. Currently we take into consideration the core the thread is running on, the NUMA node it runs on, how much allocation budget it has left compared to other heaps and how many allocating threads have been running on the same core. I do think this is a bit unnecessarily complicated so we are doing more work to see if we could simply this.

If we use the GCHeapCount config to specify fewer heaps than cores, it means there will only be that many GC threads and by default they would only run on that many cores. Of course the user threads are free to run on the rest of the cores and the allocations they do will be balanced onto the GC heaps.

Balancing GC work

Most of the current balancing done in GC is focused on marking, simply because marking is usually the phase that takes the longest. If you are going to pick tasks to balance, it makes more sense to balance the longest part that is most prone to being unbalanced โ€“ balancing work does not come without a cost.

Marking uses a mark stack which makes it a natural target for working stealing. When a GC thread is done with its own marking, it looks around to see if other threadsโ€™ mark stacks are still busy and if so, steal an object to mark. This is complicated by the fact that we implement โ€œpartial markโ€, which means if an object contains many references we only push a chunk of them onto the mark stack at a time to not overflow the stack. This means the entries on the stack may not be straightforward object addresses. Stealing needs to recognize specific sequences to determine whether it should search for other entries or read the right entry in that sequence to steal. Note that this is only turned on during full blocking GCs as the stealing does have noticeable cost in certain situations.

Performance work is largely driven by user scenarios. And as our framework is used more and more by high performance scenarios we are always doing work to shorten the pause time. Folks have asked about concurrent compacting GCs and yes, we do have that on our roadmap. But it does not mean we will stop improving our current GC. One of the things we noticed from looking at customer data is when we are doing an ephemeral GC, marking young gen objects pointed to by objects in older generations usually takes the longest time. Recently we implemented working stealing for this in 5.0 by having each GC thread takes a chunk of the older generation to process each time. It atomically increases the chunk index so if another thread is also looking at the same generation it will take the next chunk that hasnโ€™t been taken. The complication here is we might have multiple segments so we need to keep track of the current segment being processed (and its starting index). In the situation when one thread just gets to a segment which has already been processed by other threads, it knows to advance past this segment. Each chunk is guaranteed to only been processed by one thread. Because of this guarantee and the fact relocating pointers to young gen objects shares the same code path, it means this relocation work is also balanced in the same fashion.

We also do balancing work at the end of the phase so it can balance the imbalance in earlier work happening in the same phase.

There are other kinds of balancing but those are the main ones. More kinds of work can be balanced for STW GCs. We chose to focus more on the mark phase because it's most needed. We have not balanced the concurrent work just because itโ€™s more forgiving when you run concurrently. Clearly thereโ€™s merit in balancing that too so itโ€™s a matter of getting to it.

Future work

As I mentioned, we are continuing the journey to make things more balanced. Aside from balancing the current tasks more, we are also changing how heaps are organized to make balancing more natural (so the threads arenโ€™t so tightly coupled with heaps). Thatโ€™s for another blog post.

The post Balancing work on GC threads appeared first on .NET Blog.

...



๐Ÿ“Œ Balancing work on GC threads


๐Ÿ“ˆ 36.35 Punkte

๐Ÿ“Œ Threads v Processes. Is everything a process? Do threads exist or is it just lingo enforced by pThreads?


๐Ÿ“ˆ 26.46 Punkte

๐Ÿ“Œ Kernel threads v User threads. Do they communicate via IPC for the sake of executing system calls?


๐Ÿ“ˆ 26.46 Punkte

๐Ÿ“Œ Do any bluetooth transmitters that work with Windows also work with Linux, Ubuntu or Kubuntu? Do they usually work with all?


๐Ÿ“ˆ 21.12 Punkte

๐Ÿ“Œ Where can I read about how processes and threads work in linux?


๐Ÿ“ˆ 20.27 Punkte

๐Ÿ“Œ Research on Balancing Privacy with Surveillance


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Overwatch: GroรŸes Update รผberarbeitet Balancing


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Balancing Cybersecurity Practices With The Realities Of Healthcare Operations


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Research on Balancing Privacy with Surveillance


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Overwatch: GroรŸes Update รผberarbeitet Balancing


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Balancing Cybersecurity Practices With The Realities Of Healthcare Operations


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Visibility With A Human Touch: Splunk's Take On Balancing Your Cybersecurity Portfolio


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Commodore C64 Survives Over 25 Years Balancing Drive Shafts In Auto Repair Shop


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Destiny: Keine weiteren Balancing-Updates geplant


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Blizzard: Weitere Remastered-Spiele scheitern noch am Balancing


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Load Balancing: Google schรผtzt mit Cloud-Armor vor DDoS-Angriffen


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Black Hat Executive Interview: Balancing Your Business Needs With Security Diligence


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ BattleTech Update 1.1: Schnelleres Gameplay, neue Modi und besseres Balancing


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Commodore C64 Survives Over 25 Years Balancing Drive Shafts In Auto Repair Shop


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Apple's Risky Balancing Act With the Next iPhone


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Kubernetes 1.11: In-Cluster Load Balancing und CoreDNS sind stabil


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ The Brainโ€™s Balancing Act: Prof. Rony Paz - AI & Neuroscience


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Pathfinder: Kingmaker ist zu schwer - Massive Kritik am Balancing; Entwickler ...


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Call of Duty: Black Ops 4 - Neues Update mit Balancing-Anpassungen und mehr ...


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Security Mindset: Balancing Firmness and Flexibility


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Tesla Unveils New Large Powerpack Project For Grid Balancing In Europe


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Balancing the Law and Reporting: Reflections on the Assange Indictment and What It Means for Journalists


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Blizzards neuer Balancing-Ansatz: Hearthstone bekommt erneut neue Karten


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Real World Cloud Migrations: Azure Front Door for global HTTP and path based load-balancing


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Sitze fรผr Hoverboards: Elektro-Kart statt Balancing-Board


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Smash Bros. Ultimate - Balancing & Online: Wo steht der Prรผgel-Hit heute?


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ Value Balancing Alliance gestartet


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ New Apex Legends patch fixes weapon balancing


๐Ÿ“ˆ 16.08 Punkte

๐Ÿ“Œ New Apex Legends patch fixes weapon balancing


๐Ÿ“ˆ 16.08 Punkte











matomo