Question: On my local network there are (among others) 5 machines (running
Debian Jessie or Arch) wirelessly connected to a Netgear WNDR4000
router. Below is a graph of the ping times to the router
from each of the machines, collected over a period of around half an hour.

![Ping times](https://i.stack.imgur.com/U5SFs.jpg)

Observations:

* When things are going well, the ping times are all below 3ms (under
1ms for two of the machines, including the problem machine *purple*)
* At irregular intervals (of the order of 100s), three of these
machines (*red*, *green*, *purple*) suffer degradation of ping times, while the other two appear unaffected.
* The degradation periods coincide for all 3 machines.
* The degradation for *purple* is two orders of magnitude more severe than
for *green* and *red*, with ping times typically reaching over 20000ms
for *purple* and 200ms for *red* and *green*.
* If *purple* is physically moved nearer the router, the degradation
completely disappears for *purple* while continuing as before for both
*red* and *green*.
* *Red* is 3m away and in direct line of sight from the base station;
*purple*'s usual location is about 10m away without direct line of
sight.

This makes network access on *purple* intolarably slow (when it is in
its normal location).

Can you suggest how to go about diagnosing and fixing the problem?

Answer: 
I had it with an idle Wi-Fi network (Windows 7, various TP-LINK USB adapters). The ping fluctuates, making any remote terminal work a nightmare.

Solved by putting a constant load on the Wi-Fi network (e.g. fetching a small file from the router's web server in a loop).
Go to Control Panel > Network and Sharing Center > Change adapter Settings > Right Click "Local Area Connection" > Properties

Disable "Internet protocol Version 6 (TCP/IPv6)"
Disable "Link-Layer Topology Discovery Mapper I/O Driver"
Disable "Link-Layer Topology Discovery Responder"

I had Ping spikes from 30ms up to 3000ms, sometimes even "Ping request timed out" reply. After I've done this my ping returned to normal again.