Slow update approval
#3
Posted 22 Aug 2005, 00:52
michielonline, on Sat 20th Aug 2005, 05:14 pm, said:
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.
#5
Posted 28 Aug 2005, 15:20
#7 Guest_Guest_Adrian_*_*
Posted 08 Sep 2005, 07:34
robl, on Mon 29th Aug 2005, 09:51 pm, said:
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
#8
Posted 10 Sep 2005, 05:44
Mohammed Athif Khaleel
MVP - SUS / WSUS
India - Saudi Arabia
WSUS Blog
[This posting is provided "AS IS" with no warranties and confers no rights.]
#9 Guest_SBL_*
Posted 14 Sep 2005, 00:58
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!!
#10
Posted 14 Sep 2005, 05:26
Mohammed Athif Khaleel
MVP - SUS / WSUS
India - Saudi Arabia
WSUS Blog
[This posting is provided "AS IS" with no warranties and confers no rights.]
#11 Guest_Guest_*
Posted 18 Jan 2006, 11:01
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?
#12 Guest_Guest_*
Posted 20 Jan 2006, 19:29
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
#13
Posted 09 Feb 2006, 13:18
Guest, on Fri 20th Jan 2006, 09:29 pm, said:
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:\>
#14
Posted 16 Feb 2006, 14:24
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.
#15
Posted 19 Feb 2006, 15:17
We use the tool also for our montly approve actions.
Arjan de Vries
#16
Posted 20 Feb 2006, 08:29
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)
#17
Posted 20 Feb 2006, 14:20
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)
-
wsus_clean.cmd.txt (3.74K)
Number of downloads: 181
#18 Guest_StephenB_*
Posted 20 Feb 2006, 15:28
Thank you so much!
-Stephen
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]
#20 Guest_Guest_Dan_*_*
Posted 09 Jun 2006, 05:50
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

Sign In
Register
Help
This topic is locked
MultiQuote
