Best Practices - Speedy downloads
By sunconnection on Jun 27, 2007
For those of you who are experienced with Sun Connection, you know that first time you run a job to deploy a baseline - downloading can take a very long time, especially when you have 100-200 patches or RPMs.
This article will explain how to speed up those downloads!
Let's take a look at normal agent<->management server<->internet communication:
Step 1: Agent finds out it needs 200 patches, it then requests those one by one from the management server:
[Agent] --(Please give me patch A)--> [Management Server] [Internet]
Step 2: If management server has this patch in cache - it provides it right away to the agent:
[Agent] <--(Here you go, patch A)-- [Management Server] [Internet]
However, if the cache doesn't have those patches, either because it's the first time or because the cache was cleaned - that's when the slowness begins. The management server will tell the agent "Please wait!" and will go to the internet (either to Sun, RedHat or Suse) to download the requested patch:
[Agent] <--(Please wait! Error code 302)-- [Management Server] --(I need patch A)--> [Internet]
The agent, sadly but patiently says "ok, I'll just sleep for 30 seconds and try again..." while the Managment server is working to download the patch from the internet:
[Agent](sleeping 30 seconds) [Management Server] <--(Downloading patch A)-- [Internet]
The problem is that many times it takes only a few seconds to download the patch, and then you waste the rest of the time waiting. So if you have 200 patches - waiting for nothing for about 25 seconds each time adds up quickly: 200\*25 = 5000 seconds, or about 1 hour and 30 minutes of wasting time!
The solution is quite simple: instead of waiting for 30 seconds, you can reduce the time the agent waits for the management server to about 5 seconds. Here's how:
The agent has a "uce.rc" file with default values, and a ".uce.rc" file with values that were customized by the user. The location of the relevant configuration file is:
By default - Linux $UCEDIR is /opt/local/uce and Solaris $UCEDIR is /opt/SUNWuce/.
Never change the file "uce.rc". You would want to copy the relevant line from "uce.rc" and add it to ".uce.rc" and modify it there.
The relevant line is:
( all ) ( invisible.server.__general.knowledgebase_conflict_reconnect_interval, 30 );
You can easily copy this line with the following command:
# cd /opt/local/uce/agent/bin/
# grep knowledgebase_conflict_reconnect_interval uce.rc >> .uce.rc
Before performing this, make sure you don’t have this line already in .uce.rc.
Then, change the value in .uce.rc to:
( all ) ( invisible.server.__general.knowledgebase_conflict_reconnect_interval, 5 );
Then restart the agent - and you're done!
If you have any questions or suggestions for future best practices, please feel free to contact me at Eran.Steiner-AT-Sun-DOT-com.
Field Enablement Team