Re: Problem with writing fast UDP server

2008-11-25 Thread Krzysztof Retel
On Nov 21, 6:55 pm, Greg Copeland <[EMAIL PROTECTED]> wrote: > On Nov 21, 11:05 am, Krzysztof Retel <[EMAIL PROTECTED]> > wrote: > > > > > On Nov 21, 4:48 pm, Peter Pearson <[EMAIL PROTECTED]> wrote: > > > > On Fri, 21 Nov 2008 08:14:19 -0800 (PST), Krzysztof Retel wrote: > > > > I am not sure what

Re: Problem with writing fast UDP server

2008-11-21 Thread Greg Copeland
On Nov 21, 11:05 am, Krzysztof Retel <[EMAIL PROTECTED]> wrote: > On Nov 21, 4:48 pm, Peter Pearson <[EMAIL PROTECTED]> wrote: > > > On Fri, 21 Nov 2008 08:14:19 -0800 (PST), Krzysztof Retel wrote: > > > I am not sure what do you mean by CPU-bound? How can I find out if I > > > run it on CPU-bound?

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 4:48 pm, Peter Pearson <[EMAIL PROTECTED]> wrote: > On Fri, 21 Nov 2008 08:14:19 -0800 (PST), Krzysztof Retel wrote: > > I am not sure what do you mean by CPU-bound? How can I find out if I > > run it on CPU-bound? > > CPU-bound is the state in which performance is limited by the > avail

Re: Problem with writing fast UDP server

2008-11-21 Thread Peter Pearson
On Fri, 21 Nov 2008 08:14:19 -0800 (PST), Krzysztof Retel wrote: > I am not sure what do you mean by CPU-bound? How can I find out if I > run it on CPU-bound? CPU-bound is the state in which performance is limited by the availability of processor cycles. On a Unix box, you might run the "top" uti

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 5:49 am, Greg Copeland <[EMAIL PROTECTED]> wrote: > On Nov 20, 9:03 am, Krzysztof Retel <[EMAIL PROTECTED]> > wrote: > > > > > Hi guys, > > > I am struggling writing fast UDP server. It has to handle around 1 > > UDP packets per second. I started building that with non blocking > > s

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 3:52 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > >Start the server before the client. > > If you want to try this program out on POSIX, make sure you change the > time.clock() calls to time.time() calls instead, otherwise the results > aren't very meaningful. > > I gave this a

Re: Problem with writing fast UDP server

2008-11-20 Thread Greg Copeland
On Nov 20, 9:03 am, Krzysztof Retel <[EMAIL PROTECTED]> wrote: > Hi guys, > > I am struggling writing fast UDP server. It has to handle around 1 > UDP packets per second. I started building that with non blocking > socket and threads. Unfortunately my approach does not work at all. > I wrote a

Re: Problem with writing fast UDP server

2008-11-20 Thread Jean-Paul Calderone
On Fri, 21 Nov 2008 00:20:49 -0200, Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Thu, 20 Nov 2008 14:24:20 -0200, Krzysztof Retel <[EMAIL PROTECTED]> escribió: On Nov 20, 4:00 pm, [EMAIL PROTECTED] wrote: On 20 Nov, 16:03, Krzysztof Retel <[EMAIL PROTECTED]> wrote: > I am struggling writing

Re: Problem with writing fast UDP server

2008-11-20 Thread John Nagle
Gabriel Genellina wrote: En Thu, 20 Nov 2008 14:24:20 -0200, Krzysztof Retel <[EMAIL PROTECTED]> escribió: On Nov 20, 4:00 pm, [EMAIL PROTECTED] wrote: On 20 Nov, 16:03, Krzysztof Retel <[EMAIL PROTECTED]> wrote: > I am struggling writing fast UDP server. It has to handle around 1 > UDP pa

Re: Problem with writing fast UDP server

2008-11-20 Thread Gabriel Genellina
En Thu, 20 Nov 2008 14:24:20 -0200, Krzysztof Retel <[EMAIL PROTECTED]> escribió: On Nov 20, 4:00 pm, [EMAIL PROTECTED] wrote: On 20 Nov, 16:03, Krzysztof Retel <[EMAIL PROTECTED]> wrote: > I am struggling writing fast UDP server. It has to handle around 1 > UDP packets per second. I start

Re: Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
On Nov 20, 4:00 pm, [EMAIL PROTECTED] wrote: > On 20 Nov, 16:03, Krzysztof Retel <[EMAIL PROTECTED]> > wrote: > > > > > Hi guys, > > > I am struggling writing fast UDP server. It has to handle around 1 > > UDP packets per second. I started building that with non blocking > > socket and threads.

Re: Problem with writing fast UDP server

2008-11-20 Thread bieffe62
On 20 Nov, 16:03, Krzysztof Retel <[EMAIL PROTECTED]> wrote: > Hi guys, > > I am struggling writing fast UDP server. It has to handle around 1 > UDP packets per second. I started building that with non blocking > socket and threads. Unfortunately my approach does not work at all. > I wrote a si

Re: Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
On Nov 20, 3:34 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Krzysztof Retel <[EMAIL PROTECTED]> writes: > > But the server only handles 700 -- 870 packets, when it is non- > > blocking, and only 670 – 700 received with blocking sockets. > > What are your other threads doing?  Have you tried the

Re: Problem with writing fast UDP server

2008-11-20 Thread Hrvoje Niksic
Krzysztof Retel <[EMAIL PROTECTED]> writes: > But the server only handles 700 -- 870 packets, when it is non- > blocking, and only 670 – 700 received with blocking sockets. What are your other threads doing? Have you tried the same code without any threading? -- http://mail.python.org/mailman/li

Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
Hi guys, I am struggling writing fast UDP server. It has to handle around 1 UDP packets per second. I started building that with non blocking socket and threads. Unfortunately my approach does not work at all. I wrote a simple case test: client and server. The client sends 2200 packets within