• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Windows 10 Process-Termination Bug Slows Down Mighty 24-Core System to a Crawl

Joined
Mar 6, 2017
Messages
639 (1.80/day)
Likes
190
System Name My System
Processor Intel Core i5 3570k @ 4.4 GHz
Motherboard Asus P8Z77-V
Cooling ThermalTake Water 2.0
Memory 4x4 GB of Corsair Vengeance DDR3-1600
Video Card(s) AMD Radeon R9 380 with 4 GBs of RAM
Storage Samsung 850 EVO 500 GB SSD (https://www.techpowerup.com/ssdz/details/5163/)
Display(s) HP 2311x and Acer G206HQL
Audio Device(s) On-Board Sound
Power Supply Corsair 750 Watt
Keyboard Logitech Wave
Software Windows 10 Pro
Benchmark Scores https://valid.x86.fr/678sbr
#26
Joined
Jan 31, 2010
Messages
2,520 (0.86/day)
Likes
807
System Name Xtreme PC's AMDx8
Processor AMD FX8320 @ 4.0GHz NB/HT @ 2.6GHz
Motherboard Asus Crosshair V Formula
Cooling ThermoLab Baram 2x 120mm Gentle Typhoons 1850rpm
Memory 8GB (2x4GB) Mushkin Blackline DDR3 2400MHz 11/13/13/34/1T 1.65V
Video Card(s) Sapphire Nitro+ RX580 8GB OC 1342/2000 (Core/Mem) BIOS Modded
Storage 2x Kingston V300 120GB SSD's Raid0: 1x Sandisk 128GB SSD 1xWD 2TB red, 1xWD 1TB black 1xWD 2TB nas
Display(s) ViewSonic VX2457 75Hz FreeSync 1920x1080p
Case SilverStone Raven RV02B-W + 3x SS AP181 + USB3.0 upgrade
Audio Device(s) Creative SB X-Fi Xtreme PCIe + Pioneer VSX-D457 amp Technics Speaker set
Power Supply SilverStone ST75F-P Modular 750W
Mouse Logitech G402 Hyperion Fury
Keyboard Logitech G105
Software Windows 10 X64 PRO (build 1607)
Benchmark Scores it sucks even less much now ;)
#27
Joined
May 24, 2007
Messages
921 (0.23/day)
Likes
239
Location
Florida
Processor Core I7 5930k @ 4.6ghz 1.28v / Core I7 4770k @ 4.6ghz 1.25v
Motherboard Asus X99 Deluxe / MSI Z87 Mpower
Cooling H220x modded / Swiftech H220 modded
Memory 16gb ddr4 Corsair Dominator 2800mhz / 16gb ddr3 2400 G.Skill Sniper Series
Video Card(s) R9 290x + 2 R9 290s / EVGA 780 Hydro Copper
Storage Sandisk 480gb / Samsung 840 pro 256gb OS drive,1.5TB WD Black 64mb, 6TB WD/Seagate, 840 evo 240
Display(s) Dell UltraSharp U2711 / Dell UltraSharp U2711
Case Obsidian 750D /Obsidian 900D
Audio Device(s) Creative ZXR / Onboard
Power Supply Seasonic x1200 plat / Cooler master v1000 gold
Software Win 8.1/ Win 7
#28
Maybe I just failed to see the sarcasm from a guy with an Intel CPU. :p

Or I woke up grumpy because my internet is only now back after comcast had me netless for almost a week. Take your pick. ;)



Yes. It's not even broken in 7.
Ouch i feel your pain. I have crapcast too, they have some lazy shards working for them, it's like playing Russian roulette to find a decent rep that's knowledgeable and also one that is coherent at the same time. Charge that one to the house i guess. Him having that Intel CPU is his counter for not being labeled a fanboy 'ya know ehehe.
 
Last edited:
Joined
Oct 2, 2004
Messages
12,744 (2.60/day)
Likes
6,098
Location
Europe\Slovenia
System Name Dark Silence 2
Processor Intel Core i7 5820K @ 4.5 GHz (1.15V)
Motherboard MSI X99A Gaming 7
Cooling Cooler Master Nepton 120XL
Memory 32 GB DDR4 Kingston HyperX Fury 2400 MHz @ 2666 MHz
Video Card(s) AORUS GeForce GTX 1080Ti 11GB (2000/11100)
Storage Samsung 850 Pro 2TB SSD (3D V-NAND)
Display(s) ASUS VG248QE 144Hz 1ms (DisplayPort)
Case Corsair Carbide 330R Titanium
Audio Device(s) Creative Sound BlasterX AE-5 + Altec Lansing MX5021 (HiFi capacitors and OPAMP upgrade)
Power Supply BeQuiet! Dark Power Pro 11 750W
Mouse Logitech G502 Proteus Spectrum
Keyboard Cherry Stream XT Black
Software Windows 10 Pro 64-bit (Fall Creators Update)
#29
That's what happens when your browser shits gazillion processes for every little shit in a browser...
 
Joined
Aug 13, 2010
Messages
3,269 (1.19/day)
Likes
1,688
System Name kom pu tor
Processor Core i7 8700K 5Ghz
Motherboard Gigabyte Z370 Ultra Gaming
Cooling Custom 240MM WC loop
Memory G.Skill RipJawsZ 2666Mhz 16GB
Video Card(s) Palit GTX 1080 Jetstream
Storage A salad of SSDs
Case Corsair Air 540
Power Supply Antec Egde 750W
Mouse Logitec G400
Keyboard Cougar 600K
#30
Windows sucks... The only reason i use this shitty OS is to game.
 

newtekie1

Semi-Retired Folder
Joined
Nov 22, 2005
Messages
24,566 (5.49/day)
Likes
10,760
Location
Indiana, USA
Processor Intel Core i7 8700K@4.8GHz(Quick and dirty)
Motherboard AsRock Z370 Taichi
Cooling Corsair H110i GTX
Memory 32GB Corsair DDR4-3000
Video Card(s) PNY XLR8 GTX1060 6GB
Storage 480GB Crucial MX200 + 2TB Seagate Solid State Hybrid Drive with 128GB OCZ Synapse SSD Cache
Display(s) QNIX QX2710 1440p@120Hz
Case Fractal Design Define S
Audio Device(s) Onboard is good enough for me
Power Supply Corsair HX850
Software Windows 10 Pro x64
#31
The thing that bugs me most about his entire Blog post is he never mentions what version of Windows 10 he uses.

Is he using the Creators Update? Is he still on the original Windows 10 release? Has this already been fixed? We don't know, because he didn't tell us what build of Windows 10 he is on.

And I'd expect a developer to know about the different builds of Windows 10...
 

OneMoar

There is Always Moar
Joined
Apr 9, 2010
Messages
7,516 (2.61/day)
Likes
4,094
Location
Rochester area
System Name Kreij Lives On
Processor Intel Core i5 4670K @ 4.4Ghz 1.32V
Motherboard ASUS Maximus VI Gene Z87
Cooling Reeven Okeanos Single 140MM Fan +2 SP120 White's
Memory 16GB kingston hyper x @ 2133 @ 11 11 11 32
Video Card(s) EVGA GTX 1060 ACX Copper Single fan
Storage 240gb Cruical MX200SSD/WD Blue 1TB
Display(s) Samsung S24D300/HP2071D
Case Custom Full Aluminum By ST.o.CH <3
Audio Device(s) onboard
Power Supply HX 750i
Mouse Roccat KONE
Keyboard Rocatt ISKU with ISKUFX keycaps
Software Windows 10 +startisback
#32
anybody running a outdated version of windows: deserves to have there pc soaked in gasoline lit on fire and then thrown off a tall building

this is a edge case bug thats only a issue when you have 40 fucking cores and need to terminate 30 processes
and I bet you windows server doesn't have the issue
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
21,275 (6.22/day)
Likes
10,393
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#33
Only time there's mass process termination in a server environment is before shutting down.
 

OneMoar

There is Always Moar
Joined
Apr 9, 2010
Messages
7,516 (2.61/day)
Likes
4,094
Location
Rochester area
System Name Kreij Lives On
Processor Intel Core i5 4670K @ 4.4Ghz 1.32V
Motherboard ASUS Maximus VI Gene Z87
Cooling Reeven Okeanos Single 140MM Fan +2 SP120 White's
Memory 16GB kingston hyper x @ 2133 @ 11 11 11 32
Video Card(s) EVGA GTX 1060 ACX Copper Single fan
Storage 240gb Cruical MX200SSD/WD Blue 1TB
Display(s) Samsung S24D300/HP2071D
Case Custom Full Aluminum By ST.o.CH <3
Audio Device(s) onboard
Power Supply HX 750i
Mouse Roccat KONE
Keyboard Rocatt ISKU with ISKUFX keycaps
Software Windows 10 +startisback
#34
Only time there's mass process termination in a server environment is before shutting down.
which is why i said I bet windows server doesn't have the issue

this is just a case of somebody using a desktop-os on a server and then wondering why stuff is broke
 

rtwjunkie

PC Gaming Enthusiast
Joined
Jul 25, 2008
Messages
9,644 (2.75/day)
Likes
13,439
Location
Louisiana -Laissez les bons temps rouler!
Processor Core i7-3770k 3.5Ghz, O/C to 4.2Ghz fulltime @ 1.19v
Motherboard ASRock Fatal1ty Z68 Pro Gen3
Cooling All air: 2x140mm Fractal exhaust; 3x 140mm Cougar Intake; Enermax T40F CPU cooler
Memory 2x 8GB Mushkin Redline DDR-3 1866
Video Card(s) MSI GTX 980 Ti Gaming 6G LE
Storage 1x 250GB MX200 SSD; 2x 2TB WD Black; 1x4TB WD Black;1x 2TB WD Green (eSATA)
Display(s) HP 25VX 25" IPS @ 1920 x 1080
Case Fractal Design Define R4 Black w/Titanium front -windowed
Audio Device(s) Soundblaster Z
Power Supply Seasonic X-850
Mouse Logitech G500
Keyboard Logitech G610 Orion mechanical (Cherry Brown switches)
Software Windows 10 Pro 64-bit (Start10 & Fences 3.0 installed)
#35
anybody running a outdated version of windows: deserves to have there pc soaked in gasoline lit on fire and then thrown off a tall building
I'm gonna say what everyone else who see that and is thinking but is afraid to say:
WTF is WRONG with you?
 

OneMoar

There is Always Moar
Joined
Apr 9, 2010
Messages
7,516 (2.61/day)
Likes
4,094
Location
Rochester area
System Name Kreij Lives On
Processor Intel Core i5 4670K @ 4.4Ghz 1.32V
Motherboard ASUS Maximus VI Gene Z87
Cooling Reeven Okeanos Single 140MM Fan +2 SP120 White's
Memory 16GB kingston hyper x @ 2133 @ 11 11 11 32
Video Card(s) EVGA GTX 1060 ACX Copper Single fan
Storage 240gb Cruical MX200SSD/WD Blue 1TB
Display(s) Samsung S24D300/HP2071D
Case Custom Full Aluminum By ST.o.CH <3
Audio Device(s) onboard
Power Supply HX 750i
Mouse Roccat KONE
Keyboard Rocatt ISKU with ISKUFX keycaps
Software Windows 10 +startisback
#36
I'm gonna say what everyone else who see that and is thinking but is afraid to say:
WTF is WRONG with you?
_EVERYTHING_
but thats neither here nor there if you need a example of the damage a outdated os can do Cough windows 7 and wannacry cough cough
 
Joined
Mar 6, 2017
Messages
639 (1.80/day)
Likes
190
System Name My System
Processor Intel Core i5 3570k @ 4.4 GHz
Motherboard Asus P8Z77-V
Cooling ThermalTake Water 2.0
Memory 4x4 GB of Corsair Vengeance DDR3-1600
Video Card(s) AMD Radeon R9 380 with 4 GBs of RAM
Storage Samsung 850 EVO 500 GB SSD (https://www.techpowerup.com/ssdz/details/5163/)
Display(s) HP 2311x and Acer G206HQL
Audio Device(s) On-Board Sound
Power Supply Corsair 750 Watt
Keyboard Logitech Wave
Software Windows 10 Pro
Benchmark Scores https://valid.x86.fr/678sbr
#37
I wrote a quick and dirty console program in .NET that spawns 1000 child processes that simply sleeps and does nothing (an infinite loop) and then proceeds to kill said child processes. Getting Windows to respond to just about anything while it was killing the child processes was difficult at best. This is a fully updated version of Windows 10, Build 15063.483. So yeah, this seems like an issue at the Windows kernel level. :ohwell:
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
21,275 (6.22/day)
Likes
10,393
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#38
Try one process with a 1000 threads. You know, like any sane program would be. Bet there isn't a problem, yet the amount of work that can be accomplished is more or less the same.
 

OneMoar

There is Always Moar
Joined
Apr 9, 2010
Messages
7,516 (2.61/day)
Likes
4,094
Location
Rochester area
System Name Kreij Lives On
Processor Intel Core i5 4670K @ 4.4Ghz 1.32V
Motherboard ASUS Maximus VI Gene Z87
Cooling Reeven Okeanos Single 140MM Fan +2 SP120 White's
Memory 16GB kingston hyper x @ 2133 @ 11 11 11 32
Video Card(s) EVGA GTX 1060 ACX Copper Single fan
Storage 240gb Cruical MX200SSD/WD Blue 1TB
Display(s) Samsung S24D300/HP2071D
Case Custom Full Aluminum By ST.o.CH <3
Audio Device(s) onboard
Power Supply HX 750i
Mouse Roccat KONE
Keyboard Rocatt ISKU with ISKUFX keycaps
Software Windows 10 +startisback
#39
I wrote a quick and dirty console program in .NET that spawns 1000 child processes that simply sleeps and does nothing (an infinite loop) and then proceeds to kill said child processes. Getting Windows to respond to just about anything while it was killing the child processes was difficult at best. This is a fully updated version of Windows 10, Build 15063.483. So yeah, this seems like an issue at the Windows kernel level. :ohwell:
try it on windows server
 
Joined
Mar 6, 2017
Messages
639 (1.80/day)
Likes
190
System Name My System
Processor Intel Core i5 3570k @ 4.4 GHz
Motherboard Asus P8Z77-V
Cooling ThermalTake Water 2.0
Memory 4x4 GB of Corsair Vengeance DDR3-1600
Video Card(s) AMD Radeon R9 380 with 4 GBs of RAM
Storage Samsung 850 EVO 500 GB SSD (https://www.techpowerup.com/ssdz/details/5163/)
Display(s) HP 2311x and Acer G206HQL
Audio Device(s) On-Board Sound
Power Supply Corsair 750 Watt
Keyboard Logitech Wave
Software Windows 10 Pro
Benchmark Scores https://valid.x86.fr/678sbr
#40
I don't have a Windows Server laying around. If you have one I can give you the source code for the console app I wrote.
 
Joined
Nov 18, 2010
Messages
3,870 (1.46/day)
Likes
2,241
Location
Rīga, Latvia
System Name HELLSTAR
Processor Intel 5820K @ 4.6GHz
Motherboard Gigabyte GA-X99-UD3
Cooling Custom Loop. 360+240 rads.
Memory 4x8GB Corsair Vengeance LPX 3200MHz 15-17-17-35
Video Card(s) ASUS 1080 Ti FE + water block
Storage Optane 900P + Samsung 950Pro 256GB NVMe + 750 EVO 500GB
Display(s) Philips PHL BDM3270
Case Phanteks Enthoo Evolv ATX Tempered Glass
Audio Device(s) Sound Blaster ZxR
Power Supply Fractal Design Newton R3 1000W
Mouse Razer Basilisk
Keyboard Razer Deathstalker
Software Windows 10 insider
#41
I wrote a quick and dirty console program in .NET that spawns 1000 child processes that simply sleeps and does nothing (an infinite loop) and then proceeds to kill said child processes. Getting Windows to respond to just about anything while it was killing the child processes was difficult at best. This is a fully updated version of Windows 10, Build 15063.483. So yeah, this seems like an issue at the Windows kernel level. :ohwell:
Try to send it, I'll test on recent insiders.
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
21,275 (6.22/day)
Likes
10,393
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#42
I don't have a Windows Server laying around. If you have one I can give you the source code for the console app I wrote.
Hit me with it. I'll see about modifying it to multithreaded too.


I think what it's going to boil down to is that it's like having 1000 files on a file system versus having 1000 files archived into one library. It isn't abundantly obvious but those 1000 files on the file system have 4 MiB of overhead and are generally slow to access because the HDD/SDD has to read from the file system to find out where the data is then move to the file and read it. If they're all in one library, you're moving a pointer about one single file that the file system already looked up. Access time is much faster because the overhead is exponentially less.

Processes are the same way. The process has to keep record of all of its memory use. Threads can quickly request and release memory because there isn't much in the way of overhead (e.g. security/NXbit/etc.). Processes need to not only get permission to execute, they have to load all of their modules (10-30 is not uncommon). All of that needs to be unloaded from the memory while the process winds down.
 
Last edited:
Joined
Mar 6, 2017
Messages
639 (1.80/day)
Likes
190
System Name My System
Processor Intel Core i5 3570k @ 4.4 GHz
Motherboard Asus P8Z77-V
Cooling ThermalTake Water 2.0
Memory 4x4 GB of Corsair Vengeance DDR3-1600
Video Card(s) AMD Radeon R9 380 with 4 GBs of RAM
Storage Samsung 850 EVO 500 GB SSD (https://www.techpowerup.com/ssdz/details/5163/)
Display(s) HP 2311x and Acer G206HQL
Audio Device(s) On-Board Sound
Power Supply Corsair 750 Watt
Keyboard Logitech Wave
Software Windows 10 Pro
Benchmark Scores https://valid.x86.fr/678sbr
#43
Here it is, it's quick and dirty.
 

Attachments

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
21,275 (6.22/day)
Likes
10,393
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#44
Windows 10:


Windows Server 2012 R2:
 
Joined
Mar 6, 2017
Messages
639 (1.80/day)
Likes
190
System Name My System
Processor Intel Core i5 3570k @ 4.4 GHz
Motherboard Asus P8Z77-V
Cooling ThermalTake Water 2.0
Memory 4x4 GB of Corsair Vengeance DDR3-1600
Video Card(s) AMD Radeon R9 380 with 4 GBs of RAM
Storage Samsung 850 EVO 500 GB SSD (https://www.techpowerup.com/ssdz/details/5163/)
Display(s) HP 2311x and Acer G206HQL
Audio Device(s) On-Board Sound
Power Supply Corsair 750 Watt
Keyboard Logitech Wave
Software Windows 10 Pro
Benchmark Scores https://valid.x86.fr/678sbr
#45
I updated the code to included a threaded example where it creates 1000 child threads as part of the main executable process. The system does not suffer the same performance penalty that the system endures when killing 1000 child processes. Killing threads is not nearly as tasking on the system as killing whole processes.
 

Attachments

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
21,275 (6.22/day)
Likes
10,393
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#46
Here's my own threads program on the same Windows 10 machine above using Thread.Abort():

Here's the same program but instead using _Stop = true (peaceful termination):


Code:
using System;
using System.Threading;
namespace LotsOThreads
{
    class Program
    {
        private static Thread[] _Threads = new Thread[1000];
        private static volatile bool _Stop = false;
        static void Main(string[] args)
        {
            Console.WriteLine("Start threads...");
            for (int i = 0; i < _Threads.Length; i++)
            {
                _Threads[i] = new Thread(Worker);
                _Threads[i].Start();
            }
            Console.WriteLine("Waiting a second...");
            Thread.Sleep(1000);
            Console.WriteLine("Killing threads...");
            //for (int i = 0; i < _Threads.Length; i++)  // painful
            //     _Threads[i].Abort();
            _Stop = true;  // peaceful
            Console.WriteLine("Done.");
        }
        private static void Worker()
        {
            while (!_Stop)
                Thread.Sleep(1000);
        }
    }
}
As I said, whomever wrote gomacc.exe is an idiot.

Like one big file is better than lots of small files, one big process with lots of threads is better than lots of processes with one thread. The former in both cases creates a lot of hidden overhead.


To recap: left is bad (spam processes), right is good (spam threads)...
 
Last edited:
Joined
Mar 6, 2017
Messages
639 (1.80/day)
Likes
190
System Name My System
Processor Intel Core i5 3570k @ 4.4 GHz
Motherboard Asus P8Z77-V
Cooling ThermalTake Water 2.0
Memory 4x4 GB of Corsair Vengeance DDR3-1600
Video Card(s) AMD Radeon R9 380 with 4 GBs of RAM
Storage Samsung 850 EVO 500 GB SSD (https://www.techpowerup.com/ssdz/details/5163/)
Display(s) HP 2311x and Acer G206HQL
Audio Device(s) On-Board Sound
Power Supply Corsair 750 Watt
Keyboard Logitech Wave
Software Windows 10 Pro
Benchmark Scores https://valid.x86.fr/678sbr
#47
Killing a thread is more "violent" than a graceful exit which is what we would like to simulate since killing a process is what causes this issue to begin with.
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
21,275 (6.22/day)
Likes
10,393
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#48
Actually, the best way to simulate thread killing is Process.Kill.

Process.GetCurrentProcess().Kill() = instant close, no hitch
Environment.Exit(0) = instant close, no hitch
_Stop = true = moderate close, no hitch
Thread.Abort() = slow close, no hitch
 
Last edited:

OneMoar

There is Always Moar
Joined
Apr 9, 2010
Messages
7,516 (2.61/day)
Likes
4,094
Location
Rochester area
System Name Kreij Lives On
Processor Intel Core i5 4670K @ 4.4Ghz 1.32V
Motherboard ASUS Maximus VI Gene Z87
Cooling Reeven Okeanos Single 140MM Fan +2 SP120 White's
Memory 16GB kingston hyper x @ 2133 @ 11 11 11 32
Video Card(s) EVGA GTX 1060 ACX Copper Single fan
Storage 240gb Cruical MX200SSD/WD Blue 1TB
Display(s) Samsung S24D300/HP2071D
Case Custom Full Aluminum By ST.o.CH <3
Audio Device(s) onboard
Power Supply HX 750i
Mouse Roccat KONE
Keyboard Rocatt ISKU with ISKUFX keycaps
Software Windows 10 +startisback
#49
has nothing todo with memory anyway the problem is that termination is serial not parallel
has nothing todo with memory-management or disk i/o
from the original post:

Well, what do you know. Process creation is CPU bound, as it should be. Process shutdown, however, is CPU bound at the beginning and the end, but there is a long period in the middle (about a second) where it is serialized – using just one of the eight hyperthreads on the system, as 1,000 processes fight over a single lock inside of NtGdiCloseProcess. This is a serious problem. This period represents a time when programs will hang and mouse movements will hitch – and sometimes this serialized period is several seconds longer.

Threads can't be killed though, only aborted. Aborted threads are still gracefully unwound by the parent process.
the fuck they can't
thats exactly the issue thread killing is getting stuck in a lock as NtGdiCloseProcess can only work though one thread at a time and its hanging

the process needs to cooperate yes but you can most certainly force-term a thread
 
Last edited by a moderator:

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
21,275 (6.22/day)
Likes
10,393
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#50
has nothing todo with memory anyway the problem is that termination is serial not parallel
has nothing todo with memory-management or disk i/o
from the original post:

Well, what do you know. Process creation is CPU bound, as it should be. Process shutdown, however, is CPU bound at the beginning and the end, but there is a long period in the middle (about a second) where it is serialized – using just one of the eight hyperthreads on the system, as 1,000 processes fight over a single lock inside of NtGdiCloseProcess. This is a serious problem. This period represents a time when programs will hang and mouse movements will hitch – and sometimes this serialized period is several seconds longer.
It's memory. CPU usage is all over the place, memory is a straight ramp. The hitch/hang occurs when freeing all the memory that was just consumed by 1000 processes.


Hmm, out of curiousity, I'm going to try killing a single processes that uses over 10 GiB of memory...

Edit: No perceived hitch:

That is one process consuming over 12 GiB of RAM (probably some page file too), switched over to the Proccesses tab, end task, then switched back to performance and watched it unwind while moving the mouse in a circle. I never saw it stop.
 
Last edited: