We are working to investigate an issue with adding shared printers from a Windows print server to users on a Remote Desktop Session Host server, both servers are Windows Server 2019. We have an environment where we have to deploy a large number of printers to each person logging in due to them moving around quite a bit in a warehouse environment and needing access to many printers. We are handling printer deployment via GPO. We have tried both a GPO deploying the printers to all users of a given OU as well as another GPO that uses item-level targetting to deploy printers to those who are members of a given security group. The behavior is the same in both scenarios, however.
The situation is that when a new user logs in for the first time, or if we have to deploy a large number of new printers, that CPU usage for any given user spikes up very high for several minutes while the printers are added. Mind you, we pre-seed the drivers on the Remote Desktop Session Host and they are the exact same drivers that are on the print server. We are also only dealing with about 4 different printer driver types (but around 40 printers deployed per user now). What we observe when using a tool like Process Explorer is that many "drvinst.exe" processes will spawn while printers are being added after the user logs in and we also see the print spooler "spoolsv.exe" process spike up and down quite a bit. On top of this, any anti-virus that is installed (have tried with Sophos and Windows Defender) will also spike a lot. We have added printer related exceptions to our anti-virus, but this doesn't seem to matter, but also it doesn't seem to matter if we even disable anti-virus entirely. Even when AV is all removed/disabled, the CPU usage is still very high for the drvinst.exe spawned processes and spoolsv.exe (just not quite as bad, but still very bad). The one plus side is that this only happens on the first login / after adding new printers. Subsequent logins are just fine after the printers are added.
The boiling point happened a few days ago when we had to add 20 new printers for everyone and we rolled them out per usual with a GPO. Once the GPO started refreshing for users and it picked up that there were new printers, it pegged the CPU usage on the server to 100% and made it unusable. After 20-30 minutes, we had to abandon and kill the spoolsv.exe process just to get the server settled down. We rolled back the GPO printer deployment before restarting the print spooler. Needless to say, this caused a major problem with the warehouse operations and stopped work for a while until this was fixed. The server only had a small handful of people on it at the time, too.
My big question is--why is some driver install process spawning for adding each printer when the driver is already there? Are we possibly doing something wrong with adding the new printers that causes it to overwork this drvinst.exe process with each printer addition for each user? I don't feel like adding new printers should be an affair that kills the processor when the driver already exists on the print server and the Remote Desktop Session Host. I need some insight if there is something else that I can do to alleviate this behavior, or if not to have it confirmed to me that this is expected behavior that we have to deal with.
Thanks.