Saturday, May 24, 2008

AES vs. RC4/TKIP benchmark, and CPU/RAM overclocking

I've been optimizing my small wireless network lately. Its a simple setup, running OpenWrt /w X-Wrt extensions on a WRT54Gv4 (essentially a WRT54GL) and a WRT54Gv5 running in client bridge mode on a downstairs computer. After doing many benchmarks, here is what I recommend:

WPA2 AES seems to perform 10% better than WPA2 TKIP/RC4 on these Broadcom platforms. I'm still maxing out at about 22MBits, but that's better than the 18MBits I was getting. The latency seems lower as well, which is quite important for remote desktops and gaming.

Now, for overclocking. I always overclock the WRT54GL-like series to 240mhz CPU and 120mhz RAM. Just setting it to '240' implies the RAM speed is 120, so only clkfreq=240 is necessary.

Its important your Linksys model have a NEWER CFE BOOT LOADER though, else you can brick it by an invalid clock setting. Starting with the WRT54Gv4, the boot loader was changed so that invalid clock frequencies are simply ignored. I verified this during detailed disassemblies of the CFE boot loader. More information is in my old R&D wiki here .

So, if your device is one that's 'safe' to try overclocking, then except for the risk of burning out your processor and starting a fire, its good to try. Without any heat-sinks I've been running both my WRT54G class devices at 240/120 for a couple years now and everything has been fine.

You can overclock it by changing the 'clkfreq' nvram variable. On units with these newer CFEs, you simply need to set the CPU frequency and the RAM frequency will be implied as one-half of that. For example, clkfreq=240,120 is fine, though clkfreq=240 is also valid and results in the same clocking.

Why do it? Simple. For increased throughput and decreased latency. Just because your CPU is idle most of the time, doesn't mean its speed isn't important during short-term bursts when its used to its capacity.

The argument about it safeness is debatable, but the RAM seems underclocked from its specs to start with. Also, the slightly newer (5352 vs 5354) Broadcom chipset used in the WRT54Gv7.2 and above is even clocked to 240mhz, suggesting the 5352 is at least close to being capable of running 240/120. That said, overclocking is obviously pushing beyond the limits the manufacturer deemed safe, SO NEVER CONSIDER IT SAFE AND DO IT AT YOUR OWN RISK.

In the end, I always overclock these biatches for a little better performance and have NEVER had any troubles.