ReliefLabs / EasyTomato

Easy Tomato is a modified version of TomatoUSB, which is in turn a modified version of Jonathan Zarate’s excellent open source Tomato firmware. Relief Labs has worked to make this powerful firmware accessible to less technical users through easy to use documentation and a simplified interface
http://www.easytomato.org/
Other
63 stars 19 forks source link

Look Into gzip to free up nvram space #51

Open wrdixon opened 11 years ago

wrdixon commented 11 years ago

Some routers are having stability issues due to filling up the nvram. We need to figure out a way around this.

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=432543

RMerl commented 11 years ago

Reducing memory usage through gzip could be a way (use base64 to encode the resulting data afterward).

Having a watchdog monitoring free nvram space and doing something when it gets below a certain threshold (such as clearing some temporary vars) could also be an idea, but then you risk clearing temp vars that were just set by httpd as the user was committing some changes.

wrdixon commented 11 years ago

Thanks Merlin! I think we're going to look into gzip as the rules and groups in ET can use a lot of space (esp when there are 50+ computers on the network).

There are some crazier solutions we were looking into, but this will at least be a start.

djfurie commented 11 years ago

Initial tests are showing that ~11KB of "groups" can compress down into just over 2KB, base64 encoded. I've got the nvram read path sorted out, working on storing now. This will be implemented on the backend to make it transparent to the existing front end.

wrdixon commented 11 years ago

Excellent, 2KB we can afford! It's also great when we have to fix a bug that is popping up when we have 150 kids on an EasyTomato router!

lancethepants commented 10 years ago

This would be a great addition for tomato in general. I'm working on a tomato addition that would greatly benefit from nvram compression. I see there was some code started here. http://linksysinfo.org/index.php?threads/easytomato-0-8-released.68661/#post-229591

Looks like it can be made to work generically enough for any desired nvram variable. I was wondering if there's been any more work on this, or any updates you have to the code. Other large variables such as OpenVPN certs, qos rules, etc, would definitely find this useful.