This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Not accepting the More than 95 connections in eCos 2.0


Hello Gary,

I have some problems handling many requests to a tcp server in eCos 2.0.

I am using the following
	Free BSD stack.
	i386 Arch.

I have simple socket program(server) which accepts the connection, prints
the client 
data and disconnects.

Server : eCos.
Client : Windows.

The program works for a while i.e(for around 95 connection) after it reaches
95 its not
accepting the clients anymore.
It's happening every time.

In my FreeBSD configuration I have the following
Memory Designated for networking buffers : 131072 (default value is 261244)
If set the value to default(261244) value the connection limit goes upto
1000

I thought of checking the Network buffers using the cyg_kmem_print_stats()
function.
I got the following data.

Network stack mbuf stats:-----------------------------------------   1st
time
   mbufs 32, clusters 1, free clusters 1
   Failed to get 0 times
   Waited to get 0 times
   Drained queues to get 0 times
VM zone 'ripcb':
  Total: 16, Free: 16, Allocs: 0, Frees: 0, Fails: 0
VM zone 'tcpcb':
  Total: 16, Free: 16, Allocs: 3, Frees: 3, Fails: 0
VM zone 'udpcb':
  Total: 16, Free: 16, Allocs: 3, Frees: 3, Fails: 0
VM zone 'socket':
  Total: 16, Free: 16, Allocs: 6, Frees: 6, Fails: 0
Misc mpool: total   32752, free    3120, max free block 2692
Mbufs pool: total   32640, free   30464, blocksize  128
Clust pool: total   65536, free   61440, blocksize 2048


Network stack mbuf stats:-----------------------------------------   50th
time
  mbufs 32, clusters 2, free clusters 2
   Failed to get 0 times
   Waited to get 0 times
   Drained queues to get 0 times
VM zone 'ripcb':
  Total: 16, Free: 16, Allocs: 0, Frees: 0, Fails: 0
VM zone 'tcpcb':
  Total: 16, Free: 16, Allocs: 156, Frees: 156, Fails: 0
VM zone 'udpcb':
  Total: 16, Free: 16, Allocs: 3, Frees: 3, Fails: 0
VM zone 'socket':
  Total: 16, Free: 16, Allocs: 159, Frees: 159, Fails: 0
Misc mpool: total   32752, free    1488, max free block 196
Mbufs pool: total   32640, free   30464, blocksize  128
Clust pool: total   65536, free   59392, blocksize 2048


Network stack mbuf stats:-----------------------------------------   95th
time
   mbufs 32, clusters 2, free clusters 2
   Failed to get 0 times
   Waited to get 0 times
   Drained queues to get 0 times
VM zone 'ripcb':
  Total: 16, Free: 16, Allocs: 0, Frees: 0, Fails: 0
VM zone 'tcpcb':
  Total: 16, Free: 16, Allocs: 285, Frees: 285, Fails: 0
VM zone 'udpcb':
  Total: 16, Free: 16, Allocs: 3, Frees: 3, Fails: 0
VM zone 'socket':
  Total: 16, Free: 16, Allocs: 288, Frees: 288, Fails: 0
Misc mpool: total   32752, free     112, max free block 52
Mbufs pool: total   32640, free   30464, blocksize  128
Clust pool: total   65536, free   59392, blocksize 2048

>From the above data I infer that the Misc mpool : Free is loosing some
amount of bytes 
every time it accepts the connection but It's not able to reclaim the memory
eventhough you close the socket.

Is this an eCos issue?

Thanks,
Vedaraman.

-----Original Message-----
From: Gary Thomas [mailto:gary@mlbassoc.com]
Sent: Monday, May 03, 2004 7:01 PM
To: Vedaraman Sethuraman (IE10)
Subject: RE: [ECOS] FTP Support on Redboot


On Mon, 2004-05-03 at 07:16, Vedaraman Sethuraman (IE10) wrote:
> Hello Gary,
> 
> 	I tried adding FTP_CLIENT package from the ecos configuration tool.
> It asked for the package CYGPKG_NET. When i added Open BSD the conflicts
got
> resolved. But build gave some error. 
> 
> 	Should i proceed this way or copy the source files from
> \ecos-2.0\packages\net\ftpclient\v2_0\src   to 
> \ecos-2.0\packages\redboot\v2_0\src\net and build it. 
> 
> 	But ftp source files is looking for some socket calls, which is not
> there currently in \ecos-2.0\packages\redboot\v2_0\src\net directory. 
> 
> 	Pls advise.

This FTP client code is not compatible with RedBoot.  To add FTP support
to RedBoot, you will have to write new FTP client code which can run 
with the RedBoot stack (or modify the 'net' version to be compatible).
This would be similar to the TFTP support (a RedBoot version exists 
which is similar to, but unique from the 'net' stack version)

> 
> Thanks for your support,

Further comments/questions should be directed to the eCos discussion 
list.  Private support is available from MLB Associates, on a contract
basis.  n.b. I could write the RedBoot FTP server support for you for
about $750.

> Vedaraman.
> 
> -----Original Message-----
> From: Gary Thomas [mailto:gary@chez-thomas.org]
> Sent: Friday, April 30, 2004 7:56 PM
> To: Vedaraman Sethuraman (IE10)
> Cc: naiduk@intotoinc.com
> Subject: RE: [ECOS] FTP Support on Redboot
> 
> 
> ** Please note: this is a private reply, not intended for the mailing
> list
> 
> On Fri, 2004-04-30 at 08:23, Gary Thomas wrote:
> > On Fri, 2004-04-30 at 08:26, Vedaraman Sethuraman (IE10) wrote:
> > > Hello Gary,
> > > 
> > > I need to support Client FTP for downloading images.
> > > 
> > > I understand that Redboot has a minimal stack ( UDP support for doing
a
> TFTP
> > > ). 
> > > 
> > > For FTP, I think the task is to remove the standalone stack and insert
a
> > > full fledged TCP/IP stack ( Open BSD/ Free BSD). Am i right?
> > 
> > No.  RedBoot's stack, while minimal, is fully capable of running FTP via
> > TCP/IP.  It's just a matter of defining support for that protocol.
> > 
> > > 
> > > Please explain me the process of achieving this.
> 
> Adding this support is straight forward and many similar examples exist 
> in the eCos/RedBoot sources.  However, I can provide support for this 
> task (via MLB Associates) which may be a more cost-effective solution
> for you.  If you are interested, please let me know.
> 
> > > 
> > > Thanks,
> > > Vedaraman.
> > > 
> > > -----Original Message-----
> > > From: Gary Thomas [mailto:gary@mlbassoc.com]
> > > Sent: Friday, April 30, 2004 7:41 PM
> > > To: Vedaraman Sethuraman (IE10)
> > > Cc: naiduk@intotoinc.com; ecos-discuss@sources.redhat.com
> > > Subject: Re: [ECOS] FTP Support on Redboot
> > > 
> > > 
> > > On Fri, 2004-04-30 at 08:10, Vedaraman Sethuraman (IE10) wrote:
> > > > I am really waiting for inputs from any of you. Pls try to suggest.
> > > > 
> > > > Thanks,
> > > > Vedaraman.
> > > > 
> > > > >  -----Original Message-----
> > > > > From: 	Vedaraman Sethuraman (IE10)  
> > > > > Sent:	Saturday, April 03, 2004 3:47 PM
> > > > > To:	'ecos-discuss@sources.redhat.com'
> > > > > Subject:	FTP Support on Redboot
> > > > > 
> > > > > Hello,
> > > > > 
> > > > > 	I need to support FTP on Redboot. Could anyone suggest me
> the steps
> > > > > involved in this?
> > > 
> > > What sort of FTP support are you looking for?  client FTP for 
> > > downloading images?  FTP server (for some other purpose)?
> > > 
> > > > > 
> > > > > Can redboot communicate with devices sitting on different subnet.
If
> > > not,
> > > > > what are the changes i need to make. Pls suggest.
> > > 
> > > Yes, RedBoot is capable of handling this.  All you need do is define a

> > > gateway (using 'fconfig')
> > > 
> > > -- 
> > > Gary Thomas <gary@mlbassoc.com>
> > > MLB Associates
> > -- 
> > Gary Thomas <gary@mlbassoc.com>
> > MLB Associates
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]