CPU optimization ??

Discussion in 'Tomato Firmware' started by Sucker, Jun 8, 2008.

  1. Sucker

    Sucker Addicted to LI Member

    I've flashed my wrt54gl with Tomato 1.19.8815 from Victek and i can't find the possability to optimize the CPU from 200 to 216.

    where is it? or is'n it possibile to do that??
  2. Victek

    Victek Network Guru Member

    Tomato do not implement this posibility into GUI, you have to do it by telnet.

    /tmp/home/root # nvram set clkfreq=216
    /tmp/home/root # nvram commit
    Commit... done.
    /tmp/home/root #
  3. Sucker

    Sucker Addicted to LI Member

    WOW awesome, now THAT was a fast reply.
    THX :clap:
  4. jersully

    jersully LI Guru Member

    By optimize, do you mean change the CPU frequency?
  5. Kiwi8

    Kiwi8 LI Guru Member

    I believe the more appropriate term is 'overclock'. :)
  6. jersully

    jersully LI Guru Member

    Yeah, that's what I meant.:)
  7. njeske

    njeske Network Guru Member

    is there a way to do this via the scripting settings in the router gui?
  8. jsmiddleton4

    jsmiddleton4 Network Guru Member

    Yes. You just do the "nvram set clkfreq=216" or whatever freq you choose. My personal experience is the performance gain is not worth the extra heat it produces. I've played with overclocking quite a bit, case mods, adding fans powered from the bus to keep things cool inside, etc. And after it was all said and done, I could not over the long haul of usage notice any performance increase. Yes its fun to see the fast clock freq numbers. There is a difference between seeing the numbers go up and seeing performance go up. Folks who have tried overclocking can tell you to be prepared to fry/snarf a couple of routers by pushing them beyond spec. Even if you get them stable now, over the long haul with the extra heat you end up frying them.
  9. Toastman

    Toastman Super Moderator Staff Member Member

    njerske - add those lines to startup script under "ADMIN/SCRIPTS" - which is a way to enter them in the GUI...
  10. hogrod

    hogrod Network Guru Member

    On the status page on my wrt54g V3(tomato 1.19.8850) it says my CPU Frequency is already running 216mhz, is this normal speed for my version or did I somehow overclock this without knowing it?
  11. jsmiddleton4

    jsmiddleton4 Network Guru Member

    Normal for that unit. Would leave it be.
  12. Toxic

    Toxic Administrator Staff Member

    for any other users reading this thread, please be advised that changing the CPU speed can result in you bricking your device. please use the nvram set clkfreq= command with caution.
  13. szfong

    szfong Network Guru Member

    For such a unit, after gluing a couple of heatsink (Arctic Adhesive), I don't like active cooling on such small embedded devices, I d/l the CFE and edit it with a hex editor to a higher clock frequency, then re-upload it back. I have never needed a JTAG cable, because so far I have not screwed up. I do it from within dd-wrt though, because the flash writer works better there. Afterwards I reflash to Tomato. Anyhow, that way your unit WILL survive a reset if you overclock it from the CFE and stays at 240MHz. Anything higher don't give me any much better throughput. DON'T GO BEYOND 240MHz for passive cooling under ANY circumstance!!!! Even at 240MHz it's not guranteed, as variations in chips can cause it to fail. Test it 1st before modifying the CFE.

  14. jsmiddleton4

    jsmiddleton4 Network Guru Member


    How do you test it? I've bricked a router that when just doing the clkfreq setting in the startup script it worked fine. Went ahead and committed the nvram setting by going into telnet, etc. It was when I wrote the variable to nvram and rebooted that I bricked the router. So how I was testing it, was not such a good testing strategy.

    It was then as well that I decided the performance increase not worth the risk.

    But IF one can reliable test it without writing the value to memory so if there is a problem a reset or reboot will clear the setting and you are back to default, what are the steps for that?

    And if you would, could you be a bit more specific on how you do the cfe thing? How is that different in terms of end results than using nvram commit? I'm asking because the directions for enabling 32 megs on this older 54g I scored tell you that if the tweaks work, you should go ahead and tweak the cfe information. The only thing I've ever read is doing cfe via jtag. How do you make changes non-jtag to cfe and reload it?

  15. szfong

    szfong Network Guru Member

    The thing is, is that the CFE can be modified in such a way as to allow it for easy recovery via a complete reset, where reset button is depressed, and you power up the unit. I also have such a unit, with 4MB of flash and 32MB of ram. Try enabling it on a regular unit, and you have a brick. I've modified and re-uploaded the CFE to enable the extra ram and overclocked it a bit for fun. You should 1st setup the CFE so that it'll allow it for easy recovery, and THEN you should enable the extra ram, and finally play around with overclocking. The instructions I gathered are from the openwrt & dd-wrt websites. I use to give specific instructions BUT people read it and one way or another, BAD, VERY BAD things happen to their routers!! and I don't want to get blamed for it and for every thread that has such instructions, there WILL be many bricked routers. Just get the info from the two places I mentioned if you must do it. Also, it's cheaper just to get a WHR-G125 which is the fastest & cheapest Tomato router you can get.

    I'm lazy and I like to re-write the flash from within openwrt or dd-wt, but you should do it using jtag, it's very dangerous playing around with the CFE in the 1st place, doing it from within linux requires even more care, you must have good backup copies of you CFE & whole flash, just in case and perform checksumming at every step BEFORE restarting the router. By the way, I use a special flash re-write module, to do the actual flash write. It doesn't work properly under Tomato, I've tested it only on an old dd-wrt rc & openwrt.

    Anyhow, test it by issuing the command to nvram, and if they work you can later write it to the CFE to make it more permanent, so it'll survive a reset. If you don't reset your router as much as I do, on second thought, it's NOT worth the risk!

  16. jsmiddleton4

    jsmiddleton4 Network Guru Member

    Since I can get to the same place with nvram variables in either admin scripts or nvram set in telnet, probably stick with that.

    What is your test procedure to make sure a clkfreq is stable before you commit it?
  17. szfong

    szfong Network Guru Member

    I usually do it from dd-wrt, it has a nice menu for overclocking, w/ valid frequencies. I gradually go up the list, although it goes to a max of 300MHz, I stop at 240 usually. Find value that is highest which is still stable, then use that same value in Tomato.
  18. jsmiddleton4

    jsmiddleton4 Network Guru Member

    What would really be nice in terms of cfe permanent change to the firmware, etc., would be a "When reset button is pushed take clock frequency back to 200 mhz..." in the code. When I've bricked routers in the past, that was the issue. Could not get router to reset back to 200 mhz.
  19. Toxic

    Toxic Administrator Staff Member

    there is no test proceedure. you change it and hope for the best.

    change it at your peril, all i say is any newbie reading this should not do it unless you have either a modified CFE or enough money to buy an new router if it goes wrong.

    if it aint broke, dont fix it....
  20. jsmiddleton4

    jsmiddleton4 Network Guru Member

    The other thing we learned, me and some folks at dd-wrt, is that even though the gui will say you have overclocked to a particular speed, when you check cpuinfo, you haven't. The Buffalo 54HP's were great for that. You could get the display to say all sorts of things. But the cpu just rolled along at the default speed. You couldn't change it via firmware end user tweaks in the gui. Took some serious editing, cfe, etc., changes.
  21. szfong

    szfong Network Guru Member

    If you check the dd-wrt svn, I believe BS has fixed that particular issue already, I usually use the latest eko or bs builds.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice