It is currently Tue Sep 26, 2017 9:49 pm


All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Investigating Idlepc idlemax to minimise CPU usage
PostPosted: Sat Oct 22, 2011 6:03 am 
Offline

Joined: Fri Mar 05, 2010 11:33 am
Posts: 1494
Location: Australia
[Edit: Some useful background info can be found at topic6040.html (summary) or at http://rednectar.net/2013/02/24/dynamip ... d-finally/ (full Article)]
Background
This is an extension to a previous article; "The Illusive Art of Acquiring A Good Idle-PC Value". Read it before you read this.

So - you have found a good idle-pc value, and are using it in your labs. But still your CPU is churning away at a rate higher than you'd like.

There may be a solution in sight yet - the idlepc idlemax setting.

Thanks to sharky1337 who alerted me to the possibility of adjusting the idlemax values, I found that others had already started giving advice here and here.

But these all talked about setting the idlemax value to 100. I wanted to see what other values would do.

How to set the idlemax value

Step 1:
Observe your CPU Utilisation

Windows: Open the windows task manager and sort by %CPU
Linux: Open a console window and enter the command top
Mac OS X: Open a terminal window and enter the command top -o cpu

Keep this window visible for the entire process.

Step 2:
Load your topology, or build a new one. I'm assuming you are already using the best idle-pc values you could find.

Start your routers. Control->Start/Resume...

Check your CPU utilisation. After peaking high, it should settle once all routers are started.

Wait for all routers to go green.

(TIP 1: If your routers take too long to start, or won't all start, try starting a few, set the idlemax as described below and continue starting a few at at a time)
TIP 2: Opening a console session can also cause the CPU utilisation to drop.


Now click in the Dynagen management console at the bottom of the page.
Enter the command:
idlepc idlemax /all 100

Check your CPU utilisation now. It will probably have dropped. If it hasn't dropped enough, you can try another value. eg:
idlepc idlemax /all 10

BUT before you get too carried away, you must realise that all this CPU saving comes at a cost.

Step 3:
Test your Console Access
Go to the console of one of your idlemax-tamed routers and issue a show run command from privileged mode.

If, (A) the console won't open, or (B) the output from your commands is slow, then tune your idlemax value up a bit higher. To put it back to the default:
idlepc idlemax /all 1500

While still at the Dynagen management console, check your settings by issuing a show run command. You should see something like:
Code:
=> show run
autostart = False
[127.0.0.1:7200]
    workingdir = /opt/GNS3/Working
    udp = 10000
    [[3725]]
        image = /opt/GNS3/IOS/c3725-adventerprisek9-mz.124-15.T10.image
        ram = 256
        idlepc = 0x6026b804
        idlemax = 10
        ghostios = True

Step 4:
Saving your idlemax values
Nothign to it. Now that you have set the idlemax values, they will automatically be saved when you save your topology file. If you take a look at topology.net after saving your project, you should see the idlemax = xx line included.

Raw Data
For those who are interested, I conducted a barrage of tests on Macintosh OSX (GNS3 v0.7.4), Ubuntu (GNS3 0.8.1) and Windows 7 (GNS3 0.8.1). My raw results as I recorded them are in the attached file
Attachment:
idlemax.txt [11.87 KiB]
Downloaded 2038 times



_________________
RedNectar
http://rednectar.net
@rednectarchris
GNS3 WorkBench-a VMware image of Ubuntu with GNS3 and VPCS installed and a collection of exercises/labs


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO