I want to calculate the max network throughput on 1G Ethernet link. I understand how to estimate max rate in packets/sec units for 64-bytes frame:
IFG 12 bytes
MAC Preamble 8 bytes
MAC DA 6 bytes
MAC SA 6 bytes
MAC type 2 bytes
Payload 46 bytes
FCS 4 bytes
Total Frame size -> 84 bytes
Now for 1G link we get:
1,000,000,000 bits/sec * 8 bits/byte => 1,488,096 fps
As I understand, this is a data link performance, correct?
But how to calculate throughput in megabits per second for different packets size, i.e. 64,128...1518? Also, how to calculate UDP/TCP throughput, since I have to consider headers overhead.
Thanks.
Max throughput over Ethernet = (Payload_size / (Payload_size + 38)) * Link bitrate
I.e. if you send 50 bytes of payload data, max throughput would be (50 / 88) * 1,000,000,000 for a 1G link, or about 568 Mbit/s. If you send 1000 bytes of payload, max throughput is (1000/1038) * 1,000,000,000 = 963 Mbit/s.
IP+UDP adds 28 bytes of headers, so if you're looking for data throughput over UDP, you should use this formula:
Max throughput over UDP = (Payload_size / (Payload_size + 66)) * Link bitrate
And IP+TCP adds 40 bytes of headers, so that would be:
Max throughput over TCP = (Payload_size / (Payload_size + 78)) * Link bitrate
Note that these are optimistic calculations. I.e. in reality, you might have extra options in the header data that increases the size of the headers, lowering payload throughput. You could also have packet loss that causes performance to drop.
Check out the Wikipedia article on the ethernet frame, and particularly the "Maximum throughput" section:
http://en.wikipedia.org/wiki/Ethernet_frame
Related
I want to measure RPM of a metal wheel using an inductive proximity sensor (npn) and a LM2917N which is supose to convert frequency into voltage which I intend to read using an ESP32 since has 12bits ADC.
The wheel has 2 holes which will be "see" by the sensor and a diameter of 50mm. Basically for a complete RPM sensor needs to "see" 2 wholes. Considering the max speed of the wheel which I intend to measure is 5 km/h I made following calculations:
Max rpm of the wheel will be around 530 rpm.
For that rpm sensor will get max 1060 pulses per minute which means about 17.67 Hz
Min rpm which I would like to measure is 100 rpm which means about 3.2 Hz.
Now the concerns:
I see in LM2917N datasheet that the input voltage can be 0 and 28 V, in my setup will be powered at 12V and supply voltage I assume will be same 12V since proximity sensor is powered also on same power supply as LM2917N.
I am not able to do calculations of the C1, C2 and R1 based on my setup and also have to find a way to put the output voltage in range of 0-3.3V (esp32 limits)
Second help is needed to understand how to match the read voltage to frequency (eg - 1V means 10Hz or rpm...)
Any help will be highly appreciated
Thanks in advance!
after reading datasheet : formula is Vo = R1 × C1 × VCC × f
with Vcc=12V, C1=0.1 mF and R1=100K >> V0=0.12V/Hz
for 18Hz, output will be 2.16V
so you can connect directly output to analog input and convert value as
int getRPM() {
float V0 = 3.3 * analogRead(A0)/1024;
float F = V0 / 0.12;
int rpm = F * 60;
return(rpm);
}
Let's say ssthresh == 12 units
and congwin at time0 == 1 unit
I know congwin grows exponentially (powers of 2)
until ssthresh value is surpassed/reached
but at the moment congwin == 8.
will it will keep growing expo until 16 is reached
or will it grow until reaching 12 and from there will continue in a linear ascend?
Let N be the number of stations in the ring, THT the token holding time, Tt be the transmission time of packet, Tp be the propagation time of packet on Channel/ Link.
Then Cycle Time = N * THT + Tp (this is cycle time for token)
and efficiency = (useful time)/(Cycle Time)
Here useful time is stated as N * Tt. (justified as transmission time at each station in single cycle of token passing)
And thus proven efficiency = (N * Tt)/(N*THT + Tp)
Now THT depends on what strategy we are using. If I am using delayed token ring then only one station transmits the data and other station doesn't transmit the data, but everywhere showing in useful time Tt multiplied by N.In this case, THT = Tt + Tp
So, cycle time = Tp + N*(Tt + Tp)
Efficiency, e = (NTt)/(Tp + N(Tt + Tp)).
My question is why we multiplied Tt by N inspite of one transmits the data?
Here in delayed token ring N=1 since only one station transmitting the data so, Efficiency, e = Tt/Tp + Tt + Tp=Tt/2Tp + Tt .
supposed that the measurement RSS is "-70dBm" and the predicted RSS is "-68dBm, the transmission power of antenna is "-12dBm",
then if the following equation is right? if not, how to calculate it?
Error = |10 * log10 (70/12) - 10 * log10 (68/12)| = 10 * log10 (70/68)
now my measurement is the RSS in dBm, how to convert it into dB?
This often confuses folks in my experience, and as such warrants a thorough explanation.
The "m" in "dBm" means relative to 1 milliwatt. It is typically used for absolute measurements, whereas "regular" dBs are typically used for power gains/losses/diffs.
Example:
in/tx out/rx
1w .5w
(1 milliwatt = 0.001)
10log(1/0.001) = 30dBm
10log(0.5/0.0001) = 27dBm
loss = 3dB
10log(1) = 0dB
10log(0.5) = 3dB
loss still is 3dB
(note there is an implied /1w here since the argument to log must be unit-less, e.g. 0.5w/1w = 0.5 "flat" (aka no units))
So in the context of power differences, the m does not matter.
Things to note:
1/2 of power lost == -3dB gain (or +3dB loss)
power gains/losses in series are added/subtracted when in dBs -vs- multipled/divided when in watts
0 watts == -infinity dB
0 dBm == 1 milliwatt
log here is base 10 (not 2 nor e)
reletiveGainOrLoss = 10^(valueOfGainOrLossInDb/10)
valueOfPowerInMilliwatts = 10^(valueOfPowerInDbm/10)
In your example, I'll presume by error you mean the error of the predicted loss relative measured loss:
predicted loss =
known transmission power - predicted RSS =
-12dBm - -68dBm =
56dB
measured loss =
known transmission power - measured RSS =
-12dBm - -70dBm =
58dB
error of predicted loss relative to measured loss =
|predicted loss - measured loss| =
|56dB - 58dB| =
2dB (==2dBms, but for diffs we should drop the m) =
Or more directly: 70 - 68 (so easy with dBs!)
This equates to a 63% error (or 58, depending on how it is done):
10^(-2dB/10) =
0.63
(10^(2dB/10) =
1.584893192461113
In millwatts:
10^(valueInDbm/10) =
10^(-70/10) = 0.0000001 milliwatts
10^(-68/10) = 0.000000158489319 milliwatts
10^(-12/10) = 0.063095734448019 milliwatts
As a sanity check:
(0.0000001/0.063095734448019 - 0.000000158489319/0.063095734448019) / (0.0000001/0.063095734448019) =
(0.000001584893192 - 0.000002511886428) / 0.000001584893192 =
-0.000000926993236 / 0.000001584893192 =
-0.584893190707832
(note that doing it in watts is much more laborious! (not to even mention float errors))
To answer your other question regarding:
Error = |10 * log10 (70/12) - 10 * log10 (68/12)| = 10 * log10 (70/68)
The first equation is nonsensical; as discussed above: for dBs we add/subtract -vs- multiply/divide. The second equation is however true, based on one of the rules of logs:
log a + log b = log ab
When the RSS in dBm, the path loss is equal to the difference between the transmission RSS and received RSS, the unit of path loss in this case is dB.
What is the max stack size limit of 32 bit process in HP-UX B.11.31 or what is the max stack size that can be alloacted to a 32 bit process in HP -UX
MAX STACK SIZE LIMIT
Default
32 bit: 0x800000 (8MB)
64 bit: 0x10000000 (256MB)
Allowed values
32 bit minimum: 0x40000
32 bit maximum: 0x17F00000
64 bit minimum: 0x40000
64 bit maximum: 0x80000000