On Thursday 24 January 2002 12:58 pm, you wrote:
> Speaking of memory, has anyone done an analysis of various version of POE
> and perl, to see how much memory each one of these configurations use?  I
> would like to use POE on an embedded device which has limited memory, and
> no swap space.  If there is a particular combination of POE/perl that is
> low on memory usage, I'll be the first one to jump on it.  :)

POE seems memory heavy.  You might want to play with this:

(It needs the GTop.pm module with interfaces with Gnome's GTop application, 
much to my suprise, so you need to fetch that particular application and it's 
development package, or the whole source tarball, and (compile) install it, 
first.)

#!/usr/bin/perl -w

use lib '/home/jasonb/local/lib/perl/5.6.1';
use lib '/home/jasonb/src/webzeus/webzeus/src';
use GTop ();

# Shamelessly ripped from
# http://perl.apache.org/guide/performance.html
# by Stas Bekman
# Thanks Stas!!

my $gtop = GTop->new;
my $before = $gtop->proc_mem($$)->size;

for (@ARGV) {
  if (eval "require $_") {
    eval {
      $_->import;
    };
  }
  else {
    eval $_;
      die $@ if $@;
    }
}

my $after = $gtop->proc_mem($$)->size;
printf "@ARGV added %s\n", GTop::size_string($after - $before);

$./perlboat.pl 'use POE qw(Wheel::SocketFactory Wheel::ReadWrite)';
use POE qw(Wheel::SocketFactory Wheel::ReadWrite) added  2.3M
$
$./perlboat.pl 'use POE';
use POE added  1.9M
$

Someone who understands what's going on better than I might be able to 
interpret those numbers for you beyond the obvious "Wow, that's big!"

> -a
>
> At 12:51 PM 1/24/2002 -0500, you wrote:
> >On Thu, Jan 24, 2002 at 11:10:49AM -0600, Bob Maccione wrote:
> > > I've been playing with the BlockSize on my app (that's not quite done
> > > yet) and am wondering what the downside of having a larger BlockSize
> > > is?  If I know that my max message size will be 30k what is wrong with
> > > setting the BlockSize to 30k (now I understand that you don't want to
> > > set it to really really large sizes but where are the tradeoffs?
> >
> >It eats up more memory.  If you have 200 clients each sending 30KB
> >blocks, it could potentially chew up 6MB of memory just to buffer
> >them.  Come to think of it, that's not a whole lot these days.
> >
> >I imagine at some point the amount of time it takes to move those
> >blocks around breaks even with the speed gain you get from having
> >them.  I can't begin to guess where that occurs.
> >
> >-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sf.net

Reply via email to