Mailing List Archive

Cherokee for embedded
Nice work guys!!! :-)
With the last versions, I've managed to load cherokee in very very little
ram for use in embedded devices.


root 1767 0.0 5.2 4272 1476 ? Ss Jan02 0:09
/usr/sbin/cherokee-worker -d --config=/etc/cherokee/cherokee.conf
root 1768 0.0 4.9 10608 1388 ? Ss Jan02 0:00
/usr/bin/php-cgi -b 127.0.0.1:47990 -c /etc/php/php.ini
root 1769 0.0 12.7 11132 3588 ? S Jan02 0:35
/usr/bin/php-cgi -b 127.0.0.1:47990 -c /etc/php/php.ini


1.5MB of RSS for cherokee-worker (only 1 thread, we don't need more..)
1.3MB and 3.5MB for php-cgi (i could launch only one instance, 0 childs, I
think).

This is from the latest release.

It runs quite qutie fast, uses little memory & resources, it's just perfect
for me.


We only launch cherokee-worker, to reduce memory footprint, is that right?,
cherokee "parent" will only be
needed if cherokee-worker crashed, right?


We've included it as the default option for
http://projects.nbee.es/display/Xpress/00-Information+for+early+hackers

and we expect to build an online editor (ecoder or something similar) (php
based) for code projects inside the board.

Miguel Angel Ajo Pelayo
http://www.nbee.es
+34 636 52 25 69
skype: ajoajoajo
Re: Cherokee for embedded [ In reply to ]
Quite a pretty board you have there...

HOw is cherokee performing there?
Do you have any schedule for releasing that board?

Bye!

On 16/01/12 12:26, Miguel Angel wrote:
> Nice work guys!!! :-)
> With the last versions, I've managed to load cherokee in very very
> little ram for use in embedded devices.
>
>
> root 1767 0.0 5.2 4272 1476 ? Ss Jan02 0:09
> /usr/sbin/cherokee-worker -d --config=/etc/cherokee/cherokee.conf
> root 1768 0.0 4.9 10608 1388 ? Ss Jan02 0:00
> /usr/bin/php-cgi -b 127.0.0.1:47990 <http://127.0.0.1:47990> -c
> /etc/php/php.ini
> root 1769 0.0 12.7 11132 3588 ? S Jan02 0:35
> /usr/bin/php-cgi -b 127.0.0.1:47990 <http://127.0.0.1:47990> -c
> /etc/php/php.ini
>
>
> 1.5MB of RSS for cherokee-worker (only 1 thread, we don't need more..)
> 1.3MB and 3.5MB for php-cgi (i could launch only one instance, 0
> childs, I think).
>
> This is from the latest release.
>
> It runs quite qutie fast, uses little memory & resources, it's just
> perfect for me.
>
>
> We only launch cherokee-worker, to reduce memory footprint, is that
> right?, cherokee "parent" will only be
> needed if cherokee-worker crashed, right?
>
>
> We've included it as the default option for
> http://projects.nbee.es/display/Xpress/00-Information+for+early+hackers
>
> and we expect to build an online editor (ecoder or something similar)
> (php based) for code projects inside the board.
>
> Miguel Angel Ajo Pelayo
> http://www.nbee.es
> +34 636 52 25 69
> skype: ajoajoajo
>
>
> _______________________________________________
> Cherokee mailing list
> Cherokee@lists.octality.com
> http://lists.octality.com/listinfo/cherokee
Re: Cherokee for embedded [ In reply to ]
That's a neato board.

What's the CPU being bundled in that, RAM, approximate power draw?
_______________________________________________
Cherokee mailing list
Cherokee@lists.octality.com
http://lists.octality.com/listinfo/cherokee
Re: Cherokee for embedded [ In reply to ]
Thanks Alvaro & pub crawler!! :-)

I must really benchmark it on the board, but for an usual embedded system
is just not that important when any response
is fast enough like not to be perceived as slow, and the memoy footprint is
low which usually happens for most web servers
in an embedded environment.

It's a ARM9/ 180 or 270MHz (low cost) + FPGA (low power one), we expect to
release it as creative commons, but first we're developing
a set of arduino-compatible libraries (c++) +python/php/perl/c#/js wrappers
to interface the outside world.

I think Cherokee will be key to provide a good browser based code editor
for the system, that has it's own embedded gcc/g++ and set of script
interpreters,
but also as the server for user htt applications (php or cgi based).

The work is slowly being done here https://github.com/espardino/xpress/




Miguel Angel Ajo Pelayo
http://www.nbee.es
+34 636 52 25 69
skype: ajoajoajo


2012/1/16 pub crawler <pubcrawler.com@gmail.com>

> That's a neato board.
>
> What's the CPU being bundled in that, RAM, approximate power draw?
>
Re: Cherokee for embedded [ In reply to ]
About power usage, still didn't measure the whole system, but quite low.
It's based on this processor:

lpc3130/31 and
http://ics.nxp.com/products/lpc3000/datasheet/lpc3141.lpc3143.pdf




Miguel Angel Ajo Pelayo
http://www.nbee.es
+34 636 52 25 69
skype: ajoajoajo


2012/1/17 Miguel Angel <miguelangel@ajo.es>

> Thanks Alvaro & pub crawler!! :-)
>
> I must really benchmark it on the board, but for an usual embedded system
> is just not that important when any response
> is fast enough like not to be perceived as slow, and the memoy footprint
> is low which usually happens for most web servers
> in an embedded environment.
>
> It's a ARM9/ 180 or 270MHz (low cost) + FPGA (low power one), we expect
> to release it as creative commons, but first we're developing
> a set of arduino-compatible libraries (c++) +python/php/perl/c#/js
> wrappers to interface the outside world.
>
> I think Cherokee will be key to provide a good browser based code editor
> for the system, that has it's own embedded gcc/g++ and set of script
> interpreters,
> but also as the server for user htt applications (php or cgi based).
>
> The work is slowly being done here https://github.com/espardino/xpress/
>
>
>
>
>
> Miguel Angel Ajo Pelayo
> http://www.nbee.es
> +34 636 52 25 69
> skype: ajoajoajo
>
>
> 2012/1/16 pub crawler <pubcrawler.com@gmail.com>
>
>> That's a neato board.
>>
>> What's the CPU being bundled in that, RAM, approximate power draw?
>>
>
>
Re: Cherokee for embedded [ In reply to ]
This is interesting :)

Would you consider sharing your how-to for getting Cherokee on this device?

There are tons of ARM based devices out there and more on the way.
The more documentation we have on how to shoe-horn Cherokee into these
devices the better the adoption likely will be.

Using an ARM9 compatible Marvell board over here for some internal
tinkering, under Debian.

Need to benchmark the setup also.

Best of luck with your project and let us know how it proceeds.

On 1/17/12, Miguel Angel <miguelangel@ajo.es> wrote:
> About power usage, still didn't measure the whole system, but quite low.
> It's based on this processor:
>
> lpc3130/31 and
> http://ics.nxp.com/products/lpc3000/datasheet/lpc3141.lpc3143.pdf
>
>
>
>
> Miguel Angel Ajo Pelayo
> http://www.nbee.es
> +34 636 52 25 69
> skype: ajoajoajo
>
>
> 2012/1/17 Miguel Angel <miguelangel@ajo.es>
>
>> Thanks Alvaro & pub crawler!! :-)
>>
>> I must really benchmark it on the board, but for an usual embedded system
>> is just not that important when any response
>> is fast enough like not to be perceived as slow, and the memoy footprint
>> is low which usually happens for most web servers
>> in an embedded environment.
>>
>> It's a ARM9/ 180 or 270MHz (low cost) + FPGA (low power one), we expect
>> to release it as creative commons, but first we're developing
>> a set of arduino-compatible libraries (c++) +python/php/perl/c#/js
>> wrappers to interface the outside world.
>>
>> I think Cherokee will be key to provide a good browser based code editor
>> for the system, that has it's own embedded gcc/g++ and set of script
>> interpreters,
>> but also as the server for user htt applications (php or cgi based).
>>
>> The work is slowly being done here https://github.com/espardino/xpress/
>>
>>
>>
>>
>>
>> Miguel Angel Ajo Pelayo
>> http://www.nbee.es
>> +34 636 52 25 69
>> skype: ajoajoajo
>>
>>
>> 2012/1/16 pub crawler <pubcrawler.com@gmail.com>
>>
>>> That's a neato board.
>>>
>>> What's the CPU being bundled in that, RAM, approximate power draw?
>>>
>>
>>
>
_______________________________________________
Cherokee mailing list
Cherokee@lists.octality.com
http://lists.octality.com/listinfo/cherokee
Re: Cherokee for embedded [ In reply to ]
2012/1/17 pub crawler <pubcrawler.com@gmail.com>

> This is interesting :)
>
> Would you consider sharing your how-to for getting Cherokee on this device?
>

Yes, of course :-)

There are tons of ARM based devices out there and more on the way.
>

I also think that we will start seeing ARM servers around soon with the
new 64bit architecture versions,


> The more documentation we have on how to shoe-horn Cherokee into these
> devices the better the adoption likely will be.


> Using an ARM9 compatible Marvell board over here for some internal
> tinkering, under Debian.
>

Hehehe, mine is ARM9 too (arm926ej-s with no VFP) ,

Need to benchmark the setup also.


Yes, I hope I can do it in the next days, the platform seens quite stable
here.

>
>
> Best of luck with your project and let us know how it proceeds.


I will tell, keep you updated, by now I'll share my package construction
files so you could
reproduce it and check it in other ARM9 devices.


If you check the .spec file for cherokee, it sets a basic config file with
http root at /www folder,
and php-cgi information source handling .php , I added a small startup
script at /etc/rc.d/init.d/cherokee
that launches a detached cherokee-worker

--- snippet ----

export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
export CFLAGS="-L${DEV_IMAGE}/usr/lib/ -I${DEV_IMAGE}/usr/include
-mcpu=arm926ej-s -mtune=arm926ej-s -msoft-float"
./configure --prefix=%{_prefix} --sysconfdir=/etc --host=$CFGHOST
--build=%{_build} NM=arm-none-linux-gnueabi-nm
make NM=arm-none-linux-gnueabi-nm
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT/%{pfx} NM=arm-none-linux-gnueabi-nm

------------

It's important to tune for the CPU, in my case arm926ej-s and the
-msoft-float to avoid FPU emulation by kernel, but cherokee may
use little or no float, not sure :)



I also added my config for php-cgi, the php people (finally!!!!) fixed up
the cross-compilation,

--snippet----

LDFLAGS=-L${DEV_IMAGE}/usr/lib/ \
CFLAGS="-L${DEV_IMAGE}/usr/lib/ -I${DEV_IMAGE}/usr/include -mcpu=arm926ej-s
-mtune=arm926ej-s -msoft-float" \
CC=arm-none-linux-gnueabi-gcc ./configure --host=$CFGHOST
--prefix=${_prefix} --disable-all --enable-pdo --with-zlib \
--without-iconv --with-sqlite --with-sqlite3=${DEV_IMAGE}/usr
--enable-calendar \
--with-curl=${DEV_IMAGE}/usr \
--with-gd --enable-zip $EXTRA_CONFIG_OPTS \
--with-png-dir=${DEV_IMAGE}/usr --with-jpeg-dir=${DEV_IMAGE}/usr \
--enable-sockets \
--disable-cli \
--enable-session --with-pdo-sqlite \
--enable-json --enable-ctype --enable-exif
#--with-mysql --with-mysql=${DEV_IMAGE}/usr \

make -j5

rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{_prefix}
mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/modules
mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/conf
mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/htdocs
mkdir -p $RPM_BUILD_ROOT/%{pfx}/etc
mkdir -p $RPM_BUILD_ROOT/%{pfx}/etc/php

make -j5 install prefix=$RPM_BUILD_ROOT/%{pfx}/%{_prefix}
-----------------------

here the -msoft-float and cpu tunnings are essential for speedups :-)

probably it could go even faster with -O3 tunning, but didn't check it yet.


Miguel Angel Ajo Pelayo
http://www.nbee.es
+34 636 52 25 69
skype: ajoajoajo


> On 1/17/12, Miguel Angel <miguelangel@ajo.es> wrote:
> > About power usage, still didn't measure the whole system, but quite low.
> > It's based on this processor:
> >
> > lpc3130/31 and
> > http://ics.nxp.com/products/lpc3000/datasheet/lpc3141.lpc3143.pdf
> >
> >
> >
> >
> > Miguel Angel Ajo Pelayo
> > http://www.nbee.es
> > +34 636 52 25 69
> > skype: ajoajoajo
> >
> >
> > 2012/1/17 Miguel Angel <miguelangel@ajo.es>
> >
> >> Thanks Alvaro & pub crawler!! :-)
> >>
> >> I must really benchmark it on the board, but for an usual embedded
> system
> >> is just not that important when any response
> >> is fast enough like not to be perceived as slow, and the memoy footprint
> >> is low which usually happens for most web servers
> >> in an embedded environment.
> >>
> >> It's a ARM9/ 180 or 270MHz (low cost) + FPGA (low power one), we expect
> >> to release it as creative commons, but first we're developing
> >> a set of arduino-compatible libraries (c++) +python/php/perl/c#/js
> >> wrappers to interface the outside world.
> >>
> >> I think Cherokee will be key to provide a good browser based code editor
> >> for the system, that has it's own embedded gcc/g++ and set of script
> >> interpreters,
> >> but also as the server for user htt applications (php or cgi based).
> >>
> >> The work is slowly being done here
> https://github.com/espardino/xpress/
> >>
> >>
> >>
> >>
> >>
> >> Miguel Angel Ajo Pelayo
> >> http://www.nbee.es
> >> +34 636 52 25 69
> >> skype: ajoajoajo
> >>
> >>
> >> 2012/1/16 pub crawler <pubcrawler.com@gmail.com>
> >>
> >>> That's a neato board.
> >>>
> >>> What's the CPU being bundled in that, RAM, approximate power draw?
> >>>
> >>
> >>
> >
>