2013-03-20 - [GRASE-Hotspot] Minimal Packages (Was Re: Grase hotspot configuration in VMware workstation)

Header Data

From: Tim White <ti***8@gmail.com>
Message Hash: 8d351379f1dd4547b4c8bfaf8048bfa23d1ba9dd7041ecbafc951b9d82982348
Message ID: <51499736.6060701@gmail.com>
Reply To: <CAA1C2kxYc4Ut1Qrcj_p2yf3SOOMsrONdKrHU15ZJRrSu1SOj7A@mail.gmail.com>
UTC Datetime: 2013-03-20 04:02:14 UTC
Raw Date: Wed, 20 Mar 2013 21:02:14 +1000

Raw message

On 20/03/13 17:47, vicki kumar wrote:

> Also, can you please help me know what are the minimum Ubuntu 
> processes or packages required for the Grase to work properly as I 
> want to reduce it's memory usage.
>

Hi Vicki.

Not being a vmware user, I can't give you much help with that.
If you install a minimal ubuntu install, following the instructions on 
the Grase website, although using the latest ubuntu is fine, when you 
install Grase it'll pull in only what it needs. You can technically trim 
it slightly more in terms of installed packages by disabling the 
recommended packages, however this won't reduce it's memory usage.

I currently run the Grase Hotspot on embedded devices with 256Mb of ram. 
That 256Mb of ram also holds a ram disk of 128Mb that is normally got 
between 60Mb and 80Mb of data on it, leaving about 190Mb for the rest. 
Until recently this was running really well, although with the latest 
release it's a little tight on RAM.

My investigations show that Squid3, Mysql and Freeradius are the big 
users of ram. Squid3 was the one causing problems on this particular 
machine, and rather than trying to tune Squid to use less memory, given 
the lack of storage space on the device as well, I just turned off 
squids cache. This has brought squid down from using "20%" of the memory 
to 2.2%. (According to top).

According to top, freeradius is the next big user of memory. I'm yet to 
look at tuning it, and expect it may be the perl scripts that got added 
in the last release to support greater than 4Gb limits. I'll be looking 
at tuning it and trying to bring it's memory usage down when I have a 
chance.

Mysql is also a big usage of memory, however it's mostly data that it 
keeps in memory, and my understanding is that it releases data as needed 
if memory usage us high. If you look in /usr/share/doc/mysql-server-* 
you'll find an examples directory that has different tuned my.cnf files 
for different systems. For the low end systems we probably need to use 
one of those files to tune mysql down. I've not done it on this 
particular system because once squid was not caching, memory isn't an issue.

It is possible to run Grase on the Nginx webserver instead of Apache2, 
as this is supposed to use less memory. However, in my tests the 
difference was actually rather minimal, and so I haven't bothered with 
it too much. In theory it can be much better, but I don't currently have 
the time to do more work on it as once again, the system is running 
under 256Mb of ram no problems.

I hope that helps you. The only way to go lower is with the Cloud based 
Grase Hotspot I hope to write in the near future, as it moves all the 
heavy stuff (Mysql, webserver, freeradius) off the "Hotspot" device, and 
into the cloud. I've done some initial testing of a device and can run 
in less than 32Mb of ram in this setup, however there is still a lot of 
work before it'll be available.

Tim




Thread