List Info

Thread: Neko client socket and multi-threading




Neko client socket and multi-threading
country flaguser name
Russian Federation
2007-03-01 11:31:54
Hello list,

  I'm just curious whether Neko socket API supports
multi-threading
  properly? I'm using a stress-testing client for my
Apache+Neko-based
  webapp, and the client is implemented in Neko. Strangely
enough, it
  often reports socket errors like
    Custom(stdsocket_recv)
  while I have a feeling that the website responds pretty
ok. It might
  be my Windows TCP/IP stack troubles of course, but Neko
sockets and
  multi-threading also look a bit suspicious.

-- 
Best regards,
 Michael                          mailto:pltepkom.ru


-- 
Neko : One VM to run them all
(http://nekovm.org)

Re: Neko client socket and multi-threading
country flaguser name
France
2007-03-01 11:58:04
> Hello list,
> 
>   I'm just curious whether Neko socket API supports
multi-threading
>   properly? I'm using a stress-testing client for my
Apache+Neko-based
>   webapp, and the client is implemented in Neko.
Strangely enough, it
>   often reports socket errors like
>     Custom(stdsocket_recv)
>   while I have a feeling that the website responds
pretty ok. It might
>   be my Windows TCP/IP stack troubles of course, but
Neko sockets and
>   multi-threading also look a bit suspicious.

If one socket is owned by only one thread, it shouldn't
cause any
problem. Crashes can occur if you are performing some
operations on the
same socket in different threads.

The reason of socket_recv is not clear to me, it looks like
the
connection was stopped until all data has been sent, or that
more data
is being readed than available.

Nicolas

-- 
Neko : One VM to run them all
(http://nekovm.org)

Re: Neko client socket and multi-threading
country flaguser name
Russian Federation
2007-03-02 03:07:39
Hello Nicolas,

NC> If one socket is owned by only one thread, it
shouldn't cause any
NC> problem. Crashes can occur if you are performing some
operations on the
NC> same socket in different threads.

NC> The reason of socket_recv is not clear to me, it
looks like the
NC> connection was stopped until all data has been sent,
or that more data
NC> is being readed than available.

I see.. It is actually strange, what I am experiencing is
when I am
launching stress tester in multi-threaded mode, average
response time
is about 8-10 seconds and many threads fail. When I do the
same on my
server (to eliminate network latency), the same number of
threads fail
but after 50-100 milliseconds waiting. I initially thought
that my
server doesn't handle the load, but this statistics combined
with
request processing time about 50 ms (from apache access
logs) makes me
think that there is something else here.

So to summarize: client sockets fail for some strange
reason, and it
does not seem to be network latency/connection problems.
Maybe the
problem is on the server actually - but any ideas?

-- 
Best regards,
 Michael                            mailto:pltepkom.ru


-- 
Neko : One VM to run them all
(http://nekovm.org)

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )