Hi folks,
I am checking the efficiency of my batman-adv network in terms of CPU usage. My system consists of batman-adv 2011.1.0 enabled 3 laptops.
A-----B------C
There is no direct contact between A and C. So, node B is the relaying node. The systems cpu configuration in all nodes are:
In A : cpu MHz = 2000 In B : cpu MHz = 1000 In C : cpu MHz = 800
When I checked the CPU usage at different nodes (using netperf), I found the following results.
TCP CPU utilization send local from C to B = 5.84% TCP CPU utilzation send local from B to A = 2.37% TCP CPU utilization from C to A (2-hop environment) = 9.19%
UDP CPU utilization send local from C to B = 0.75% UDP CPU utilization send local from B to A = 3.85% UDP CPU utilization send local from C to A (2-hop environment) = 4.31%
My questions are why is the CPU utilization so less for UDP case? In case of TCP cpu utilization, isn't 9.19% a very high value for a system consisting of just 3 nodes?
Since, B is acting as a relaying node to relay the network from C to A, what is its impact on total CPU usage?
Thanks
Max
On Wednesday, August 10, 2011 12:43:58 Max Ip wrote:
When I checked the CPU usage at different nodes (using netperf), I found the following results.
TCP CPU utilization send local from C to B = 5.84% TCP CPU utilzation send local from B to A = 2.37% TCP CPU utilization from C to A (2-hop environment) = 9.19%
UDP CPU utilization send local from C to B = 0.75% UDP CPU utilization send local from B to A = 3.85% UDP CPU utilization send local from C to A (2-hop environment) = 4.31%
May I ask how you measured the batman-adv CPU usage ? Or is this simply the load created by netperf ?
Before we can speculate why the load is so high / low, we need to know what was measured in the first place.
Regards, Marek
On Wed, Aug 10, 2011 at 1:13 PM, Marek Lindner lindner_marek@yahoo.de wrote:
On Wednesday, August 10, 2011 12:43:58 Max Ip wrote:
When I checked the CPU usage at different nodes (using netperf), I found the following results.
TCP CPU utilization send local from C to B = 5.84% TCP CPU utilzation send local from B to A = 2.37% TCP CPU utilization from C to A (2-hop environment) = 9.19%
UDP CPU utilization send local from C to B = 0.75% UDP CPU utilization send local from B to A = 3.85% UDP CPU utilization send local from C to A (2-hop environment) = 4.31%
May I ask how you measured the batman-adv CPU usage ? Or is this simply the load created by netperf ?
Before we can speculate why the load is so high / low, we need to know what was measured in the first place.
Regards, Marek
For the test, I run netperf on server and client.
What I mean from by
TCP CPU utilization send local from C to B = 5.84%
is
netperf -H 192.168.101.156 -t TCP_STREAM -c -C
B (192.168.101.156) was set as netperf server and C was client. So, from client we send default TCP_STREAM created by netperf. So, bulk data transfer performance between 2 nodes can be measured in terms of throughput and CPU utilization in sending data. For more details :
http://www.netperf.org/svn/netperf2/tags/netperf-2.5.0/doc/netperf.html#TCP_...
The receive socket size bytes, send socket size bytes and send message size bytes were set to the default values i.e 87380, 16384 and 16384 respectively. The command gave the CPU utilization of 5.84% on node C (sending node).
I hope the explanation is clear.
Thanks. Max
On Wednesday, August 10, 2011 13:50:48 Max Ip wrote:
http://www.netperf.org/svn/netperf2/tags/netperf-2.5.0/doc/netperf.html#TCP _005fSTREAM
The receive socket size bytes, send socket size bytes and send message size bytes were set to the default values i.e 87380, 16384 and 16384 respectively. The command gave the CPU utilization of 5.84% on node C (sending node).
Meaning netperf tells you the CPU utilization or you get it from top / uptime / etc ? If so, why do you conclude this is the CPU load generated by batman- adv ? It seems to me you are measuring the CPU load generated by netperf not batman-adv.
You could disable/bypass batman-adv and repeat the test whilst using static routes. What is the CPU load you get then ? By comparing these 2 tests (one with batman-adv and one without) you could say something about the load generated by batman-adv.
Regards, Marek
Without batman-advanced protocol between the nodes and when all nodes are communicating to each other the results for TCP and UDP cpu usage were:
A B C (all in communication range)
TCP CPU utilization send local from C to B = 5.85% TCP CPU utilzation send local from B to A = 0.90% TCP CPU utilization send local from C to A = 5.10%
After the nodes C and A were disconnected, we enabled batman-adv on all of the nodes and tested the cpu usage:
A B C (C & A out of contact)
TCP CPU utilization send local from C to B = 6.04% TCP CPU utilzation send local from B to A = 1.127% TCP CPU utilization send local from C to A = 8.615%
Thus I calculated that the (subtracting batman enabled cpu usage - batman disabled cpu usage)
CPU load due to batman-adv (from C to B) = 0.19% (1-hop) (which is 6.04 - 5.85) CPU load due to batman-adv (from B to A) = 0.27% (1-hop) (which is 1.127 - 0.90) CPU load due to batman-adv (from C to A) = 1.865% (2-hop) (which is 8.615 - 5.85 - 0.90)
The CPU load for 2-hop is more than that for 1-hop which is obvious. But, shouldn't the individual some of 1-hops (0.19% + 0.27 % = 0.46%) be equal to the 2-hop (1.865%).
So, the thing is I was expecting 0.46% but ended up with 1.865% for the 2-hop case.
Also, what about the CPU load on the relaying node itself (node B)?
MaX
On Wed, Aug 10, 2011 at 4:37 PM, Marek Lindner lindner_marek@yahoo.de wrote:
On Wednesday, August 10, 2011 13:50:48 Max Ip wrote:
http://www.netperf.org/svn/netperf2/tags/netperf-2.5.0/doc/netperf.html#TCP _005fSTREAM
The receive socket size bytes, send socket size bytes and send message size bytes were set to the default values i.e 87380, 16384 and 16384 respectively. The command gave the CPU utilization of 5.84% on node C (sending node).
Meaning netperf tells you the CPU utilization or you get it from top / uptime / etc ? If so, why do you conclude this is the CPU load generated by batman- adv ? It seems to me you are measuring the CPU load generated by netperf not batman-adv.
You could disable/bypass batman-adv and repeat the test whilst using static routes. What is the CPU load you get then ? By comparing these 2 tests (one with batman-adv and one without) you could say something about the load generated by batman-adv.
Regards, Marek
Hi,
before we proceed any further would you please solve the riddle of *how* you obtain the CPU usage values ? I have asked this question several times but could not find any answer in your mails. Maybe it is something obvious I am missing ?
Without batman-advanced protocol between the nodes and when all nodes are communicating to each other the results for TCP and UDP cpu usage were:
A B C (all in communication range)
TCP CPU utilization send local from C to B = 5.85% TCP CPU utilzation send local from B to A = 0.90% TCP CPU utilization send local from C to A = 5.10%
Why are you not building the same setup ? Comparing 2 different setups to draw conclusions is a bit weird ..
CPU load due to batman-adv (from C to B) = 0.19% (1-hop) (which is 6.04 - 5.85) CPU load due to batman-adv (from B to A) = 0.27% (1-hop) (which is 1.127 - 0.90) CPU load due to batman-adv (from C to A) = 1.865% (2-hop) (which is 8.615 - 5.85 - 0.90)
The CPU load for 2-hop is more than that for 1-hop which is obvious. But, shouldn't the individual some of 1-hops (0.19% + 0.27 % = 0.46%) be equal to the 2-hop (1.865%).
In your first email you explain that all 3 systems use different hardware components (800MHz/1000MHz/2000MHz). Adding / subtracting percentage values based on different hardware is weird too .. Also, you probably will notice that you obtain different values depending on which node has to generate the packets. For instance, A -> C won't give you the same results as C -> A.
Also, what about the CPU load on the relaying node itself (node B)?
What about it ?
Regards, Marek
The CPU usage is the resources consumed to run the netperf test. netperf gives the amount of CPU it consumes while sending the stream TCP_STREAM from client to the server. So, the CPU usage is calculated on the network first without batman-adv and secondly with batman-adv enabled on each nodes. Thus the difference would measure the cpu load created by batman-adv. So, I don't use top / uptime / etc.
The whole point of using batman-adv in this experiment is to create adhoc connection between the end nodes (A and C) which are out of contact. So, the intermediate node (B) acts as the relaying node. So, I would like to create a virtual 2-hop condition (using ebtables to disable connection between end nodes A and C). Now that the 2-hop case is formed, what would be its effect in terms of CPU usage in node B. I don't think I can use any better setup than this one.
The percentage values I have stated are already normalized to 800 Mhz for simplicity. For example in node B (cpu 1000 Mhz) has CPU usage 1%, I use 1% of 1000 which is 10 and now (10/800) is 1.25%. I have thus used 1.25% instead of 1%.
I don't still get why the cpu load generated by batman-adv for 2-hop case is so high (1.865% when I was expectiong 0.46% as described in previous email).
I hope I explained better now.
Max
On Thu, Aug 11, 2011 at 4:37 PM, Marek Lindner lindner_marek@yahoo.de wrote:
Hi,
before we proceed any further would you please solve the riddle of *how* you obtain the CPU usage values ? I have asked this question several times but could not find any answer in your mails. Maybe it is something obvious I am missing ?
Without batman-advanced protocol between the nodes and when all nodes are communicating to each other the results for TCP and UDP cpu usage were:
A B C (all in communication range)
TCP CPU utilization send local from C to B = 5.85% TCP CPU utilzation send local from B to A = 0.90% TCP CPU utilization send local from C to A = 5.10%
Why are you not building the same setup ? Comparing 2 different setups to draw conclusions is a bit weird ..
CPU load due to batman-adv (from C to B) = 0.19% (1-hop) (which is 6.04 - 5.85) CPU load due to batman-adv (from B to A) = 0.27% (1-hop) (which is 1.127 - 0.90) CPU load due to batman-adv (from C to A) = 1.865% (2-hop) (which is 8.615 - 5.85 - 0.90)
The CPU load for 2-hop is more than that for 1-hop which is obvious. But, shouldn't the individual some of 1-hops (0.19% + 0.27 % = 0.46%) be equal to the 2-hop (1.865%).
In your first email you explain that all 3 systems use different hardware components (800MHz/1000MHz/2000MHz). Adding / subtracting percentage values based on different hardware is weird too .. Also, you probably will notice that you obtain different values depending on which node has to generate the packets. For instance, A -> C won't give you the same results as C -> A.
Also, what about the CPU load on the relaying node itself (node B)?
What about it ?
Regards, Marek
On Monday 15 August 2011 12:02:34 Max Ip wrote:
The percentage values I have stated are already normalized to 800 Mhz for simplicity. For example in node B (cpu 1000 Mhz) has CPU usage 1%, I use 1% of 1000 which is 10 and now (10/800) is 1.25%. I have thus used 1.25% instead of 1%.
You assume that there is a direct linear correlation between processing power and Hz of different CPUs... this is just wrong.
I don't still get why the cpu load generated by batman-adv for 2-hop case is so high (1.865% when I was expectiong 0.46% as described in previous email).
There are many factors. Driver overhead related to collision avoidance (or retransmissions), ebtables (now there are a lot of packets to drop), ...?
Or we could say: you're setup is not suitable for that kind of test.
Kind regards, Sven
On Monday, August 15, 2011 12:02:34 Max Ip wrote:
The CPU usage is the resources consumed to run the netperf test. netperf gives the amount of CPU it consumes while sending the stream TCP_STREAM from client to the server. So, the CPU usage is calculated on the network first without batman-adv and secondly with batman-adv enabled on each nodes. Thus the difference would measure the cpu load created by batman-adv. So, I don't use top / uptime / etc.
When netperf tells you how much CPU cycles it consumed how can you deduce the batman-adv load from it ? netperf runs in user space and has no knowledge about what is going on in the kernel. In fact, netperf probably asks the kernel how many CPU cycles were consumed by its own process. In other words: netperf has no way of knowing the load created by the kernel as it simply is beyond its scope. I suggest looking at tools that are able to analyze kernel load, for example ftrace.
The whole point of using batman-adv in this experiment is to create adhoc connection between the end nodes (A and C) which are out of contact. So, the intermediate node (B) acts as the relaying node. So, I would like to create a virtual 2-hop condition (using ebtables to disable connection between end nodes A and C). Now that the 2-hop case is formed, what would be its effect in terms of CPU usage in node B. I don't think I can use any better setup than this one.
What you want to achieve is understandable but you were running different test setups and compared the results. Without batman-adv you had no relay and with batman-adv you had a relay. Trying to fix the difference with a simple calculation should only be done if one understands all the implications.
Regards, Marek
b.a.t.m.a.n@lists.open-mesh.org