WSUS Support Forums: Slow update approval - WSUS Support Forums

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

Slow update approval

#1 User is offline   ManiacoDepressif 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 1
  • Joined: 12-Aug-05

Posted 12 Aug 2005, 05:03

Hi everyone !

I'm wondering how long it takes on your servers to approve ALL the updates.
It's taking 2 hours to approuve 446 updates, and I find this is a litle too much.

MD
0

#2 User is offline   michielonline 

  • Member
  • PipPip
  • Group: Regular Members
  • Posts: 16
  • Joined: 19-Aug-05

Posted 20 Aug 2005, 08:14

Same problem here!
I even tried switching from MSDE to SQL but that didn't solve it. If anyone has a way of speeding it up I'm all ears!

Fortunately you only need to do it once :)
0

#3 User is offline   saratoga 

  • Advanced Member
  • PipPipPip
  • Group: Regular Members
  • Posts: 134
  • Joined: 28-Jan-05

Posted 22 Aug 2005, 00:52

michielonline, on Sat 20th Aug 2005, 05:14 pm, said:

Same problem here!
I even tried switching from MSDE to SQL but that didn't solve it. If anyone has a way of speeding it up I'm all ears!

Fortunately you only need to do it once :)



Same here, took me the best part of a couple of working days to set approvals on all 1000+ updates. shocking.
0

#4 Guest_Guest_*

  • Group: Guests

Posted 26 Aug 2005, 07:19

Same here... :-(
0

#5 User is offline   VictPark 

  • Advanced Member
  • PipPipPip
  • Group: Regular Members
  • Posts: 117
  • Joined: 06-Jul-05

Posted 28 Aug 2005, 15:20

I have never heard of this problem before, we had approx 946 updates to approve, and it took about 30 mins to an hour. You are talking about just the approving, not the downloading. Why dont you just set it to automatically approve the updates, then it doesnt have to be done manually. Also if its about downloading the updates then it would be because of the BITS software.
0

#6 User is offline   robl 

  • Advanced Member
  • PipPipPip
  • Group: Regular Members
  • Posts: 56
  • Joined: 20-Jan-04

Posted 29 Aug 2005, 04:51

took about 30 minutes on a brand new server with 2 GB ram.. that could ofcourse have something to do with it.
0

#7 Guest_Guest_Adrian_*_*

  • Group: Guests

Posted 08 Sep 2005, 07:34

robl, on Mon 29th Aug 2005, 09:51 pm, said:

took about 30 minutes on a brand new server with 2 GB ram.. that could ofcourse have something to do with it.


We have been having the same problem here - its been getting slower and slower. We have set up a maintenance program for it now, that re-indexes the tables.

This seems to have made things somewhat better in that more of the updates can be approved than before

I really hope that they fix this soon
0

#8 User is offline   Md.Athif Khaleel 

  • Advanced Member
  • PipPipPip
  • Group: Regular Members
  • Posts: 3009
  • Joined: 11-May-04

Posted 10 Sep 2005, 05:44

Let's see what MS says... http://www.wsuswiki....wUpdateApproval
Good day,
Mohammed Athif Khaleel
MVP - SUS / WSUS
India - Saudi Arabia
WSUS Blog

[This posting is provided "AS IS" with no warranties and confers no rights.]
0

#9 Guest_SBL_*

  • Group: Guests

Posted 14 Sep 2005, 00:58

hi ,

the best way is to configure BITS !!

1. net stop WSusService

2. C:\Program Files\Update Services\tools\osql\osql.exe -S "Server Name"\WSUS -E -b -n -Q "USE SUSDB update tbConfigurationC set BitsDownloadPriorityForeground=1"

3. net start WSusService

But, observe the full bandwidth will be used !! Think, other application on the Server need also bandwidth!!
0

#10 User is offline   Md.Athif Khaleel 

  • Advanced Member
  • PipPipPip
  • Group: Regular Members
  • Posts: 3009
  • Joined: 11-May-04

Posted 14 Sep 2005, 05:26

I suggested the same for one of the users but that did not work.
Good day,
Mohammed Athif Khaleel
MVP - SUS / WSUS
India - Saudi Arabia
WSUS Blog

[This posting is provided "AS IS" with no warranties and confers no rights.]
0

#11 Guest_Guest_*

  • Group: Guests

Posted 18 Jan 2006, 11:01

I am experiencing very slow approval changes with a total of 668 updates on the server. Reviewed SQL Server processes at the time of updates and there is very high blocking occurring on the WSUS database. The server is a dual 2.4GHz Xeon with 4GB RAM and SCSI disks. I have staged updates to different groups of servers in the past (devl, test, production servers) but I am now just trying to get all updated marked to Install so that I can get them installed. If I can get the update to complete, I can get 14-20 of them updated at a time in about 20 -25 minutes. This is VERY slow. I looked at some tables in the WSUS database and there are many with over 80K records, some with 180K records. I've reindexed the tables with no visible change to update speed.

The WSUS database is approx 550MB in size at this point.

Does anyone have a status on a fix, or a method to prevent this issue yet?
0

#12 Guest_Guest_*

  • Group: Guests

Posted 20 Jan 2006, 19:29

I seem to have found a workaround with the slo behaviour that WSUS comes up with after being in production for quite a while:

I had an interesting challenge today. I couldn't delete old computers out of my WSUS GUI. Plus WSUS became slow-slow over the last couple of weeks.

Turns out that the database log file was 2GB in size.



In case you have seen the LOG files of your SQL Server MSDE from WSUS grow like crazy or have similar problems, here's some steps to get the log files back to square one.

Problem: The log files grow and grow and grow until a backup from the database is done. After that the logfiles can be shrunk small again.

After a couple of months this game will have to be played again.



On your WSUS server in CMD.exe:



osql -E -S servername\wsus


use SUSDB

go



backup database SUSDB to disk = 'd:\backup.bak' with format (replace d:\ with any drive of your liking)

go



after the backup is finished:



dbcc shrinkdatabase ('SUSDB')

go



That will nicely shrink the log files and bring WSUS up to speed again.

Thorsten
0

#13 User is offline   John__M 

  • Newbie
  • Pip
  • Group: Regular Members
  • Posts: 4
  • Joined: 11-May-05

Posted 09 Feb 2006, 13:18

View PostGuest, on Fri 20th Jan 2006, 09:29 pm, said:

I seem to have found a workaround with the slo behaviour that WSUS comes up with after being in production for quite a while:

I had an interesting challenge today. I couldn't delete old computers out of my WSUS GUI. Plus WSUS became slow-slow over the last couple of weeks.

Turns out that the database log file was 2GB in size.



In case you have seen the LOG files of your SQL Server MSDE from WSUS grow like crazy or have similar problems, here's some steps to get the log files back to square one.

Problem: The log files grow and grow and grow until a backup from the database is done. After that the logfiles can be shrunk small again.

After a couple of months this game will have to be played again.



On your WSUS server in CMD.exe:



osql -E -S servername\wsus


use SUSDB

go



backup database SUSDB to disk = 'd:\backup.bak' with format (replace d:\ with any drive of your liking)

go



after the backup is finished:



dbcc shrinkdatabase ('SUSDB')

go



That will nicely shrink the log files and bring WSUS up to speed again.

Thorsten



so I tried this and it seems to help with the navatigation in the admin page, the database size didn't change it's still almost 2.3 gig, not sure what the log file was
here is the output from the above commands

F:\>osql -E -S servername\wsus
1> use SUSDB
2> go
1> backup database SUSDB to disk = 'd:\backup_wsus.bak'
2> go
Processed 285408 pages for database 'SUSDB', file 'SUSDB' on file 1.
Processed 250 pages for database 'SUSDB', file 'SUSDB_log' on file 1.
BACKUP DATABASE successfully processed 285658 pages in 661.723 seconds (3.536
MB/sec).
1> dbcc shrinkdatabase ('SUSDB')
2> go
DbId FileId CurrentSize MinimumSize UsedPages EstimatedPages
------ ------ ----------- ----------- ----------- --------------
5 1 285408 96 284848 284848
5 2 63 63 56 56

(2 rows affected)
DBCC execution completed. If DBCC printed error messages, contact your system
administrator.
1> exit

F:\>
0

#14 User is offline   Ch®is B 

  • Member
  • PipPip
  • Group: Regular Members
  • Posts: 33
  • Joined: 16-Feb-06

Post icon  Posted 16 Feb 2006, 14:24

:rolleyes:

We had a DB that was over 6GB in size and had run several DB utilities along with the WSUS tools just to get the Admin Page to function with out timeouts (everything was SLOW). We then performed a cleanup of the the patches and computers listed as many were obsolete. Our fault for not properly babysitting WSUS I suppose.

We download everything from MS in multiple languages and support several thousand clients. We built a maintenance script which we are still tweaking to maintain the database though a scheduled job. Anyway, one problem we ran into is the the OSQL backup to disk command Appends to the existing file so we have added commands to rename the existing backup file and then backup the SUSDB. We also added a log backup to keep the logs clean. Not sure if this is helpful but here is the backup SQL script we use now.

use SUSDB
go
Backup Database SUSDB to disk = 'd:\backup\backup_wsus.bak'
go
backup log SUSDB with TRUNCATE_ONLY
GO
exit

Not sure if this is still an issue out there but I'd be happy to help if I can. This took us forever but we finally have control of without any reinstalls and are still using WMSDE and now it is FAST.
0

#15 User is offline   Freez 

  • Member
  • PipPip
  • Group: Regular Members
  • Posts: 20
  • Joined: 21-Dec-05

Posted 19 Feb 2006, 15:17

Give our approval tool called Wsuster a try. You can download it from http://www.wsus.nl At this moment we got only positive responses...

We use the tool also for our montly approve actions.


Arjan de Vries
0

#16 User is offline   Freez 

  • Member
  • PipPip
  • Group: Regular Members
  • Posts: 20
  • Joined: 21-Dec-05

Posted 20 Feb 2006, 08:29

We had the same problem today. And also our tool was slow :-(

But we fixed it.

1. We trucated the WSUS Database table tbEventInstance because it had more then 1 million rows.
2. Installed WSUS hotfix KB909131.
The hotfix replaces the Store Procedure for cleaning up the table. If you have a lot of clients it does't clean up enough. And your table will grow every day. After exeeding the 1 million rows the performance will be terrible!


We installed also WSUS hotfix KB910847. (because we had some problems on our clients)
0

#17 User is offline   Ch®is B 

  • Member
  • PipPip
  • Group: Regular Members
  • Posts: 33
  • Joined: 16-Feb-06

Post icon  Posted 20 Feb 2006, 14:20

We did the same but through a combination of the MS articles and other tools. Since I cannot find any reason not to simply keep truncating the tbEventInstace table we just added that to our Backup/Cleanup script should the tbl exceed 3000 records using the same OSQL commands that the MS article describes. We create more than 30k rows each day but running a weekly clean up should keep thing in order.

So to combine all this together one might want to put in a Backup routine similar to what we have done.

Here is the structure for the WSUS-Scripts we use for maintenance.

Folder D:\WSUS-Scripts and D:\Backup are assumed so if you don't use the same path you'll need to find and replace these in the first few lines below. This is a bit long but is essentially a simple set of commands. We went from several GB to around 500MB after this process. You can copy the below syntax to a .cmd file and schedule it for routine maintenance. I haven't heard anything back on this but it worked very well for us so far. Not sure if we captured all the recommendations but so far so good for us. This post is as-is but let me know if it helps anyone or if it needs to be improved.


SET ScriptPath=D:\WSUS-Scripts
SET BackupPath=D:\Backup
SET WSUS_DB=%ComputerName%\WSUS
SET ProgPath=%ProgramFiles%\Update Services\Tools
if not exist "%ScriptPath%\wsus_clean.log" echo Log Created > "%ScriptPath%\wsus_clean.log"

echo :---------------Begin WSUS Cleanup-------------------: >> %ScriptPath%\wsus_clean.log
if not exist "%ProgPath%\wsusdebugtool.exe" echo Please Download the Debug tool from http://download.micr...ebug%20Tool.EXE
if not exist "%ProgPath%\wsusdebugtool.exe" echo ERROR Please Download the Debug tool from http://download.micr...ebug%20Tool.EXE >> "%ScriptPath%\wsus_clean.log"
if exist "%ProgPath%\wsusdebugtool.exe" echo %ProgPath%\wsusdebugtool.exe Found. >> "%ScriptPath%\wsus_clean.log"

echo Starting WSUS Cleanup.... >> "%ScriptPath%\wsus_clean.log"
date /t >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Stopping Web Service >> "%ScriptPath%\wsus_clean.log"
NET STOP w3svc >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin Deletion of Unneededrevisions >> %ScriptPath%\wsus_clean.log
echo :: >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
"%ProgPath%\wsusutil.exe" deleteunneededrevisions >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin Purge of Unneeded Files >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
"%ProgPath%\wsusdebugtool.exe" /tool:purgeunneededfiles >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin OSQL Commands to backup the DB >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
del "%BackupPath%\backup_wsus.bak.old"
ren "%BackupPath%\backup_wsus.bak" backup_wsus.bak.old
Osql -S %WSUS_DB% -E /Q "Backup Database SUSDB to disk = '%BackupPath%\backup_wsus.bak'" >> "%ScriptPath%\wsus_clean.log"
Osql -S %WSUS_DB% -E /Q "backup log SUSDB with TRUNCATE_ONLY" >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin OSQL Commands to Add Indexes if missing >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
Osql -S %WSUS_DB% -E /Q "USE SUSDB BEGIN TRAN IF NOT EXISTS (SELECT * FROM sysindexes where name='nc7DeploymentRevision') BEGIN CREATE NONCLUSTERED INDEX nc7DeploymentRevision ON dbo.tbDeployment(RevisionID, TargetGroupID, ActionID) END COMMIT TRAN" >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin OSQL Commands to Truncate tbEventInstance >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
Osql -S %WSUS_DB% -E /Q "USE SUSDB declare @RS as int select @RS=(select count(*) from tbEventInstance) select @RS as tbEventInstanceRowCount if @RS > '3000' truncate table tbEventInstance" >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin OSQL Commands to compress the DB >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
Osql -S %WSUS_DB% -E /Q "use SUSDB dbcc shrinkdatabase ('SUSDB')" >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Starting Web Services >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
net start w3svc >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

date /t >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
echo :---------------Cleanup Finished -------------------: >> "%ScriptPath%\wsus_clean.log"

SET ScriptPath=
SET BackupPath=
SET WSUS_DB=

:END

Attached File(s)


0

#18 Guest_StephenB_*

  • Group: Guests

Posted 20 Feb 2006, 15:28

This is brilliant. Using the script right now..

Thank you so much!
-Stephen


B)-->
QUOTE(Ch®is B @ Tue 21st Feb 2006, 07:20 am) 9034"]<{POST_SNAPBACK}>

We did the same but through a combination of the MS articles and other tools. Since I cannot find any reason not to simply keep truncating the tbEventInstace table we just added that to our Backup/Cleanup script should the tbl exceed 3000 records using the same OSQL commands that the MS article describes. We create more than 30k rows each day but running a weekly clean up should keep thing in order.

So to combine all this together one might want to put in a Backup routine similar to what we have done.

Here is the structure for the WSUS-Scripts we use for maintenance.

Folder D:\WSUS-Scripts and D:\Backup are assumed so if you don't use the same path you'll need to find and replace these in the first few lines below. This is a bit long but is essentially a simple set of commands. We went from several GB to around 500MB after this process. You can copy the below syntax to a .cmd file and schedule it for routine maintenance. I haven't heard anything back on this but it worked very well for us so far. Not sure if we captured all the recommendations but so far so good for us. This post is as-is but let me know if it helps anyone or if it needs to be improved.


SET ScriptPath=D:\WSUS-Scripts
SET BackupPath=D:\Backup
SET WSUS_DB=%ComputerName%\WSUS
SET ProgPath=%ProgramFiles%\Update Services\Tools
if not exist "%ScriptPath%\wsus_clean.log" echo Log Created > "%ScriptPath%\wsus_clean.log"

echo :---------------Begin WSUS Cleanup-------------------: >> %ScriptPath%\wsus_clean.log
if not exist "%ProgPath%\wsusdebugtool.exe" echo Please Download the Debug tool from http://download.micr...ebug%20Tool.EXE
if not exist "%ProgPath%\wsusdebugtool.exe" echo ERROR Please Download the Debug tool from http://download.micr...ebug%20Tool.EXE >> "%ScriptPath%\wsus_clean.log"
if exist "%ProgPath%\wsusdebugtool.exe" echo %ProgPath%\wsusdebugtool.exe Found. >> "%ScriptPath%\wsus_clean.log"

echo Starting WSUS Cleanup.... >> "%ScriptPath%\wsus_clean.log"
date /t >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Stopping Web Service >> "%ScriptPath%\wsus_clean.log"
NET STOP w3svc >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin Deletion of Unneededrevisions >> %ScriptPath%\wsus_clean.log
echo :: >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
"%ProgPath%\wsusutil.exe" deleteunneededrevisions >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin Purge of Unneeded Files >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
"%ProgPath%\wsusdebugtool.exe" /tool:purgeunneededfiles >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin OSQL Commands to backup the DB >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
del "%BackupPath%\backup_wsus.bak.old"
ren "%BackupPath%\backup_wsus.bak" backup_wsus.bak.old
Osql -S %WSUS_DB% -E /Q "Backup Database SUSDB to disk = '%BackupPath%\backup_wsus.bak'" >> "%ScriptPath%\wsus_clean.log"
Osql -S %WSUS_DB% -E /Q "backup log SUSDB with TRUNCATE_ONLY" >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin OSQL Commands to Add Indexes if missing >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
Osql -S %WSUS_DB% -E /Q "USE SUSDB BEGIN TRAN IF NOT EXISTS (SELECT * FROM sysindexes where name='nc7DeploymentRevision') BEGIN CREATE NONCLUSTERED INDEX nc7DeploymentRevision ON dbo.tbDeployment(RevisionID, TargetGroupID, ActionID) END COMMIT TRAN" >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin OSQL Commands to Truncate tbEventInstance >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
Osql -S %WSUS_DB% -E /Q "USE SUSDB declare @RS as int select @RS=(select count(*) from tbEventInstance) select @RS as tbEventInstanceRowCount if @RS > '3000' truncate table tbEventInstance" >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Begin OSQL Commands to compress the DB >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
Osql -S %WSUS_DB% -E /Q "use SUSDB dbcc shrinkdatabase ('SUSDB')" >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

echo Starting Web Services >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
net start w3svc >> "%ScriptPath%\wsus_clean.log"
echo :: >> "%ScriptPath%\wsus_clean.log"

date /t >> "%ScriptPath%\wsus_clean.log"
time /t >> "%ScriptPath%\wsus_clean.log"
echo :---------------Cleanup Finished -------------------: >> "%ScriptPath%\wsus_clean.log"

SET ScriptPath=
SET BackupPath=
SET WSUS_DB=

:END
[/quote]
0

#19 Guest_Shire_*

  • Group: Guests

Posted 13 Apr 2006, 23:51

Useful script! Thank you!
0

#20 Guest_Guest_Dan_*_*

  • Group: Guests

Posted 09 Jun 2006, 05:50

The reason why approval of updates takes so long is because by default WSUS downloads only the info about each update. Only when you approve the update WSUS will download it from Microsoft.

If you open WSUS Admin and go to Options\Synchronization Options\Update Files and Languages\Advanced you will see that by default the option "Download update files to this server only when updates are approved" is checked. Unfortunately, WSUS was written in such way that if this option is selected then update downloads will accure when you aprrove new updates and not later on in background.

After you have approved updates, open command prompt and run "netstat -a". You will see an open HTTP session to Microsoft or to your proxy server if you have one.

If you uncheck that option on Advanced screen the updates will be downloaded during the synchronization process and approvals will take very short time.


Hope it helps,

Dan
0

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users