public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Re: eCos + goAhead probelm
@ 2004-08-15 14:37 Amir Yiron
  2004-08-17  4:41 ` [ECOS] " Hao
  0 siblings, 1 reply; 12+ messages in thread
From: Amir Yiron @ 2004-08-15 14:37 UTC (permalink / raw)
  To: ecos-discuss

Hello Hao!

I've got the same problem!
The target has eCos 2.0, and I use GoAhead 2.1.8 as well.

I'm using an improved kernel, with:
CYGPKG_NET_MEM_USAGE set to 512K (instead of 256K)
where NET_MEMPOOL_SIZE is 5/8 of CYGPKG_NET_MEM_USAGE (instead of 1/4)
CYGPKG_NET_MAX_SOCKETS set to 192 (instead of 16)

I increased 'bufsize' for bopen() to 192K, 256K, and more (instead of 60K).
I also tried to create a separate thread with a stack size of 80K (and
later 120K) and put the original main code inside ...

... But in all cases the web server was unstable, and crashed after some
play...

 Any suggestion?

b.t.w. When I load the default GoAhead web site (home.asp),
it doesn't handle with the left side menu applet (classes/treeapp.jar) -
it just leaves it black (no error message!)
The same applet works fine on Linux.

Why does it behave like that?
Have you got this problem as well?

Thanks in advance,
-- Amir

---------------------------------------------------------------
Hao wrote:

I build a target system that use eCos + goAhead web server.
When I run goAhead , and try to open a page from browser.
My target is failed at malloc() reutrn NULL.
But the ping function still work.
I set CYGNUM_MEMALLOC_FALLBACK_MALLOC_POOL_SIZE from 16384 to 1638400.
But, it doesn't help.
Then I try to use 'Simple variable block implementation' instead of
'Doug Lea's malloc implementatioin'.
It still don't work.

My target system already pass all eCos tests include memalloc. And the
on board memory is
16MB. I think it's enough for eCos + goAhead.

It seems goAhead eat all of memory. why ?
Does anybody has same problem as I ?
I use goAhead 2.18 + eCos (2004/06/24 got from CVS).
(I already try goAhead 2.14 ~ 2.18. All that have same problem)

Regards
Hao

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: [ECOS]  eCos + goAhead probelm
@ 2004-08-17 15:39 Amir Yiron
  0 siblings, 0 replies; 12+ messages in thread
From: Amir Yiron @ 2004-08-17 15:39 UTC (permalink / raw)
  To: sebastien.couret, Hao, ecos-discuss

Thanks Sebastien!

It works also at mine webs.
Anyway, also now (with the 50ms) it's still much slower than the
original socketSelect implementation (with a huge memory pool of 1.25M ..)

This "Winodw's implementation" of socketSelect is slow regardless the bufsize I work with (bopen).
Any idea why?

Thanks a lot,
-- Amir

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of sebastien Couret
Sent: Tuesday, August 17, 2004 3:53 PM
To: Hao; ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] eCos + goAhead probelm


Well , in files Sockgen.c and main.c , you will find a call to socketSelect 
(on my 2.1.7 version, it's line 563 for Sockgen.c and line 77 for main.c) , 
the second argument is 1000 or 2000 (it's the timeout in milli-seconds). I 
suggested you to decrease this value to 50 in both files. 

I really thing that the second implementation of socketSelect is broken and 
doesn't even take this timeout in account which makes it faster than the 
first one. 

On the other hand, I would like to inform U that I have done a epk package of 
a light modified version of GoAhead Version 2.1.7 (It works as a thread and 
has some debugging asp pages for memory leaks ). 
I can send it to you if it helps and I will be pleased of your feedback.

For increasing performance, you can also act on your library build with the 
configtool by removing debugging flags, gdb stubs , asserts , tracing , 
thread list and stack checking. I had obtain a ratio of 6 by doing this for 
networking benchmarks.



On Tuesday 17 August 2004 15:25, Hao wrote:
> Hi, sebastien,
>
> Thanks for your information.
> I try your suggestion on my target. The problem of out of memory
> disappleared!!!
> The goAhead isn't crashed, but very very slowly when open a simple page.
> Do you have any experience about this ?
>
> Hao
>
> >Hello All,
> >In the past , (With GoAhead Webserver v 2.1.7) , I ran into the same kind
> > of problem with eCos.
> >After investigation this was caused by function "int socketSelect(int sid,
> >int timeout)" in file Sockgen.c (the one /* not WIN || CE || NW */ ) which
> >makes calls to balloc.
> >Using the another "socketSelect" (the one #if (defined (WIN) || defined
> > (CE) ) solved the memory leak/overflow. May be you should try this before
> > modifying balloc.c .
> >
> >Note : Now, I use a 64K balloc buffer without any problems.
> >
> >Hope this helps. Have a nice day.
> >
> >On Tuesday 17 August 2004 06:41, Hao wrote:
> >>Recently,  I modify balloc() in balloc.c of goAhead.
> >>I try to increase 64bytes at the line of  malloc() .  And the problem of
> >>out of memory disappeared.
> >>So , I think it's not the probelm caused by eCos.
> >>I think it's caused by goAhead somewhere that call balloc() and use
> >>wrong size.
> >>
> >>Now, in my target, goAhead still unstable just like you say. Then I use
> >>very simple web page instead of default web page(home.asp).
> >>It still unstable, but not crashed.
> >>But it can work very fine when I use 'lynx' instead of other browser(IE,
> >>mozilla..).
> >>I don't know what's the difference of behavior between lynx and other
> >>browser (IE,mozilla).
> >>
> >>Hope this information can help you something.
> >>
> >>Hao
> >>
> >>>Hello Hao!

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [ECOS]  eCos + goAhead probelm
@ 2004-08-17 13:10 sebastien Couret
  0 siblings, 0 replies; 12+ messages in thread
From: sebastien Couret @ 2004-08-17 13:10 UTC (permalink / raw)
  To: ecos-discuss; +Cc: couret.se

Hello All,
In the past , (With GoAhead Webserver v 2.1.7) , I ran into the same kind of
problem with eCos.
After investigation this was caused by function "int socketSelect(int sid,
int timeout)" in file Sockgen.c (the one /* not WIN || CE || NW */ ) which
makes calls to balloc.
Using the another "socketSelect" (the one #if (defined (WIN) || defined (CE)
) solved the memory leak/overflow. May be you should try this before
modifying balloc.c .

Note : Now, I use a 64K balloc buffer without any problems.

Hope this helps. Have a nice day.

On Tuesday 17 August 2004 06:41, Hao wrote:
> Recently,  I modify balloc() in balloc.c of goAhead.
> I try to increase 64bytes at the line of  malloc() .  And the problem of
> out of memory disappeared.
> So , I think it's not the probelm caused by eCos.
> I think it's caused by goAhead somewhere that call balloc() and use
> wrong size.
>
> Now, in my target, goAhead still unstable just like you say. Then I use
> very simple web page instead of default web page(home.asp).
> It still unstable, but not crashed.
> But it can work very fine when I use 'lynx' instead of other browser(IE,
> mozilla..).
> I don't know what's the difference of behavior between lynx and other
> browser (IE,mozilla).
>
> Hope this information can help you something.
>
> Hao
>
> >Hello Hao!
> >
> >I've got the same problem!
> >The target has eCos 2.0, and I use GoAhead 2.1.8 as well.
> >
> >I'm using an improved kernel, with:
> >CYGPKG_NET_MEM_USAGE set to 512K (instead of 256K)
> >where NET_MEMPOOL_SIZE is 5/8 of CYGPKG_NET_MEM_USAGE (instead of 1/4)
> >CYGPKG_NET_MAX_SOCKETS set to 192 (instead of 16)
> >
> >I increased 'bufsize' for bopen() to 192K, 256K, and more (instead of
> > 60K). I also tried to create a separate thread with a stack size of 80K
> > (and later 120K) and put the original main code inside ...
> >
> >... But in all cases the web server was unstable, and crashed after some
> >play...
> >
> > Any suggestion?
> >
> >b.t.w. When I load the default GoAhead web site (home.asp),
> >it doesn't handle with the left side menu applet (classes/treeapp.jar) -
> >it just leaves it black (no error message!)
> >The same applet works fine on Linux.
> >
> >Why does it behave like that?
> >Have you got this problem as well?
> >
> >Thanks in advance,
> >-- Amir
> >
> >---------------------------------------------------------------
> >Hao wrote:
> >
> >I build a target system that use eCos + goAhead web server.
> >When I run goAhead , and try to open a page from browser.
> >My target is failed at malloc() reutrn NULL.
> >But the ping function still work.
> >I set CYGNUM_MEMALLOC_FALLBACK_MALLOC_POOL_SIZE from 16384 to 1638400.
> >But, it doesn't help.
> >Then I try to use 'Simple variable block implementation' instead of
> >'Doug Lea's malloc implementatioin'.
> >It still don't work.
> >
> >My target system already pass all eCos tests include memalloc. And the
> >on board memory is
> >16MB. I think it's enough for eCos + goAhead.
> >
> >It seems goAhead eat all of memory. why ?
> >Does anybody has same problem as I ?
> >I use goAhead 2.18 + eCos (2004/06/24 got from CVS).
> >(I already try goAhead 2.14 ~ 2.18. All that have same problem)
> >
> >Regards
> >Hao

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [ECOS]  eCos + goAhead probelm
@ 2004-08-17  5:37 Amir Yiron
  2004-08-17  7:57 ` Hao
  0 siblings, 1 reply; 12+ messages in thread
From: Amir Yiron @ 2004-08-17  5:37 UTC (permalink / raw)
  To: ecos-discuss


After some more tests, I've got a stable web server when I call bopen()
with a bufsize of 1.25M !
(1M is still not enough - I could bring it to crash after a massive set
of requests... )
Does it make sense?

What is the malloc size you're using for balloc's malloc() to solve the
out of memory problem?

Thanks,
-- Amir

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Hao
Sent: Tuesday, August 17, 2004 6:41 AM
To: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] eCos + goAhead probelm



Recently,  I modify balloc() in balloc.c of goAhead.
I try to increase 64bytes at the line of  malloc() .  And the problem of 
out of memory disappeared.
So , I think it's not the probelm caused by eCos.
I think it's caused by goAhead somewhere that call balloc() and use 
wrong size.

Now, in my target, goAhead still unstable just like you say. Then I use 
very simple web page instead of default web page(home.asp).
It still unstable, but not crashed.
But it can work very fine when I use 'lynx' instead of other browser(IE, 
mozilla..).
I don't know what's the difference of behavior between lynx and other 
browser (IE,mozilla).

Hope this information can help you something.

Hao


>Hello Hao!
>
>I've got the same problem!
>The target has eCos 2.0, and I use GoAhead 2.1.8 as well.
>
>I'm using an improved kernel, with:
>CYGPKG_NET_MEM_USAGE set to 512K (instead of 256K)
>where NET_MEMPOOL_SIZE is 5/8 of CYGPKG_NET_MEM_USAGE (instead of 1/4)
>CYGPKG_NET_MAX_SOCKETS set to 192 (instead of 16)
>
>I increased 'bufsize' for bopen() to 192K, 256K, and more (instead of 60K).
>I also tried to create a separate thread with a stack size of 80K (and
>later 120K) and put the original main code inside ...
>
>... But in all cases the web server was unstable, and crashed after some
>play...
>
> Any suggestion?
>
>b.t.w. When I load the default GoAhead web site (home.asp),
>it doesn't handle with the left side menu applet (classes/treeapp.jar) -
>it just leaves it black (no error message!)
>The same applet works fine on Linux.
>
>Why does it behave like that?
>Have you got this problem as well?
>
>Thanks in advance,
>-- Amir
>
>---------------------------------------------------------------
>Hao wrote:
>
>I build a target system that use eCos + goAhead web server.
>When I run goAhead , and try to open a page from browser.
>My target is failed at malloc() reutrn NULL.
>But the ping function still work.
>I set CYGNUM_MEMALLOC_FALLBACK_MALLOC_POOL_SIZE from 16384 to 1638400.
>But, it doesn't help.
>Then I try to use 'Simple variable block implementation' instead of
>'Doug Lea's malloc implementatioin'.
>It still don't work.
>
>My target system already pass all eCos tests include memalloc. And the
>on board memory is
>16MB. I think it's enough for eCos + goAhead.
>
>It seems goAhead eat all of memory. why ?
>Does anybody has same problem as I ?
>I use goAhead 2.18 + eCos (2004/06/24 got from CVS).
>(I already try goAhead 2.14 ~ 2.18. All that have same problem)
>
>Regards
>Hao
>
>  
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: [ECOS]  eCos + goAhead probelm
@ 2004-08-17  5:35 Amir Yiron
  0 siblings, 0 replies; 12+ messages in thread
From: Amir Yiron @ 2004-08-17  5:35 UTC (permalink / raw)
  To: ecos-discuss

After some more tests, I've got a stable web server when I call bopen()
with a bufsize of 1.25M !
(1M is still not enough - I could bring it to crash after a massive set
of requests... )
Does it make sense?

What is the malloc size you're

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Hao
Sent: Tuesday, August 17, 2004 6:41 AM
To: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] eCos + goAhead probelm



Recently,  I modify balloc() in balloc.c of goAhead.
I try to increase 64bytes at the line of  malloc() .  And the problem of 
out of memory disappeared.
So , I think it's not the probelm caused by eCos.
I think it's caused by goAhead somewhere that call balloc() and use 
wrong size.

Now, in my target, goAhead still unstable just like you say. Then I use 
very simple web page instead of default web page(home.asp).
It still unstable, but not crashed.
But it can work very fine when I use 'lynx' instead of other browser(IE, 
mozilla..).
I don't know what's the difference of behavior between lynx and other 
browser (IE,mozilla).

Hope this information can help you something.

Hao


>Hello Hao!
>
>I've got the same problem!
>The target has eCos 2.0, and I use GoAhead 2.1.8 as well.
>
>I'm using an improved kernel, with:
>CYGPKG_NET_MEM_USAGE set to 512K (instead of 256K)
>where NET_MEMPOOL_SIZE is 5/8 of CYGPKG_NET_MEM_USAGE (instead of 1/4)
>CYGPKG_NET_MAX_SOCKETS set to 192 (instead of 16)
>
>I increased 'bufsize' for bopen() to 192K, 256K, and more (instead of 60K).
>I also tried to create a separate thread with a stack size of 80K (and
>later 120K) and put the original main code inside ...
>
>... But in all cases the web server was unstable, and crashed after some
>play...
>
> Any suggestion?
>
>b.t.w. When I load the default GoAhead web site (home.asp),
>it doesn't handle with the left side menu applet (classes/treeapp.jar) -
>it just leaves it black (no error message!)
>The same applet works fine on Linux.
>
>Why does it behave like that?
>Have you got this problem as well?
>
>Thanks in advance,
>-- Amir
>
>---------------------------------------------------------------
>Hao wrote:
>
>I build a target system that use eCos + goAhead web server.
>When I run goAhead , and try to open a page from browser.
>My target is failed at malloc() reutrn NULL.
>But the ping function still work.
>I set CYGNUM_MEMALLOC_FALLBACK_MALLOC_POOL_SIZE from 16384 to 1638400.
>But, it doesn't help.
>Then I try to use 'Simple variable block implementation' instead of
>'Doug Lea's malloc implementatioin'.
>It still don't work.
>
>My target system already pass all eCos tests include memalloc. And the
>on board memory is
>16MB. I think it's enough for eCos + goAhead.
>
>It seems goAhead eat all of memory. why ?
>Does anybody has same problem as I ?
>I use goAhead 2.18 + eCos (2004/06/24 got from CVS).
>(I already try goAhead 2.14 ~ 2.18. All that have same problem)
>
>Regards
>Hao
>
>  
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [ECOS] eCos + goAhead probelm
@ 2004-08-04  6:19 Hao
  0 siblings, 0 replies; 12+ messages in thread
From: Hao @ 2004-08-04  6:19 UTC (permalink / raw)
  To: ecos-discuss

I build a target system that use eCos + goAhead web server.
When I run goAhead , and try to open a page from browser.
My target is failed at malloc() reutrn NULL.
But the ping function still work.
I set CYGNUM_MEMALLOC_FALLBACK_MALLOC_POOL_SIZE from 16384 to 1638400.
But, it doesn't help.
Then I try to use 'Simple variable block implementation' instead of
'Doug Lea's malloc implementatioin'.
It still don't work.

My target system already pass all eCos tests include memalloc. And the
on board memory is
16MB. I think it's enough for eCos + goAhead.

It seems goAhead eat all of memory. why ?
Does anybody has same problem as I ?
I use goAhead 2.18 + eCos (2004/06/24 got from CVS).
(I already try goAhead 2.14 ~ 2.18. All that have same problem)

Regards
Hao

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-08-17 15:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-15 14:37 [ECOS] Re: eCos + goAhead probelm Amir Yiron
2004-08-17  4:41 ` [ECOS] " Hao
2004-08-17  8:27   ` Hou Qing
2004-08-17 12:35   ` sebastien Couret
2004-08-17 13:25     ` Hao
2004-08-17 13:49       ` sebastien Couret
  -- strict thread matches above, loose matches on Subject: below --
2004-08-17 15:39 Amir Yiron
2004-08-17 13:10 sebastien Couret
2004-08-17  5:37 Amir Yiron
2004-08-17  7:57 ` Hao
2004-08-17  5:35 Amir Yiron
2004-08-04  6:19 Hao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).