surley my computer to my computer should be instant
0.102ms is the same as 0.102x10^(-3) seconds or 0.000102 seconds. It doesn't get much more "instant" than that.
During this tenth of a thousandth of a second your system has to:
- read the ICMP echo request from the rxqueue* of the loopback device
- build a corresponding ICMP echo reply packet
- write the reply packet to the txqueue* of the loopback interface
- read the packet back from the rxqueue* for ping to calculate the RTT.
Your concern seems to be that this RTT is not constant. This is explained by the fact that your system is doing a ton other stuff while doing this process.
I run an apache webserver which gives a 403 error on localhost. When I
If you're using the
ping command it doesn't really matter whether you run a webserver or not. If you're using the webserver response time as a "ping" there's quite a few additional layers the packet needs to go through.
(*): this isn't entirely true, any logic below layer 3 is obviously short-circuited, but the point is it will go through the whole stack