unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* workers does not seems to exit when served one client
@ 2009-11-03  9:44 HaiMing Yin
  2009-11-03 16:56 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: HaiMing Yin @ 2009-11-03  9:44 UTC (permalink / raw)
  To: mongrel-unicorn

quote from http://unicorn.bogomips.org/:

{{{
workers all run within their own isolated address space and only serve
one client at a time for maximum robustness.
}}}

top shows:

{{{
25398 www-data  20   0  268m 137m 3364 S    0  1.7  27:49.41
unicorn_rails
25400 www-data  20   0  266m 135m 3364 S    0  1.7  25:24.31
unicorn_rails
25397 www-data  20   0  265m 134m 3364 S    0  1.7  31:50.72 unicorn_rails
}}}

pid are the same since unicorn_rails worker started, and the RES and
TIME+ column clearly shows that unicorn_rails did not exit after
served one client.

What I'm doing wrong?

-- 
Regards,
Josh.Yin/殷海明
Friendfeed: http://friendfeed.com/yinhm
_______________________________________________
mongrel-unicorn mailing list
mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn

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

* Re: workers does not seems to exit when served one client
  2009-11-03  9:44 workers does not seems to exit when served one client HaiMing Yin
@ 2009-11-03 16:56 ` Eric Wong
  2009-11-04  5:33   ` HaiMing Yin
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2009-11-03 16:56 UTC (permalink / raw)
  To: unicorn list

HaiMing Yin <epaulin@gmail.com> wrote:
> quote from http://unicorn.bogomips.org/:
> 
> {{{
> workers all run within their own isolated address space and only serve
> one client at a time for maximum robustness.
> }}}
> 
> top shows:
> 
> {{{
> 25398 www-data  20   0  268m 137m 3364 S    0  1.7  27:49.41
> unicorn_rails
> 25400 www-data  20   0  266m 135m 3364 S    0  1.7  25:24.31
> unicorn_rails
> 25397 www-data  20   0  265m 134m 3364 S    0  1.7  31:50.72 unicorn_rails
> }}}
> 
> pid are the same since unicorn_rails worker started, and the RES and
> TIME+ column clearly shows that unicorn_rails did not exit after
> served one client.
> 
> What I'm doing wrong?

Hi HaiMing,

You're doing nothing wrong except misunderstanding that phrase.

"one client at a time" means it's not possible to be servicing more
clients than there are worker_processes (the kernel will buffer them).

Basically your workers <=> clients mapping will look like this with
Unicorn:

     unicorn master
     \_ unicorn worker[0]
     |  \_ client[0]
     \_ unicorn worker[1]
     |  \_ client[1]
     \_ unicorn worker[2]
     |  \_ client[2]
     ...
     \_ unicorn worker[M]
        \_ client[M]


Where in other servers (such as Rainbows!) it'll look like this
with multiple clients running under one worker:

     rainbows master
     \_ rainbows worker[0]
     |  \_ client[0,0]
     |  \_ client[0,1]
     |  \_ client[0,2]
     |  ...
     |  \_ client[0,N]
     ...
     \_ rainbows worker[M]
        \_ client[M,0]
        \_ client[M,1]
        \_ client[M,2]
        ...
        \_ client[M,N]

-- 
Eric Wong

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

* Re: workers does not seems to exit when served one client
  2009-11-03 16:56 ` Eric Wong
@ 2009-11-04  5:33   ` HaiMing Yin
  0 siblings, 0 replies; 3+ messages in thread
From: HaiMing Yin @ 2009-11-04  5:33 UTC (permalink / raw)
  To: unicorn list

On Wed, Nov 4, 2009 at 12:56 AM, Eric Wong <normalperson@yhbt.net> wrote:
>
> You're doing nothing wrong except misunderstanding that phrase.
>
> "one client at a time" means it's not possible to be servicing more
> clients than there are worker_processes (the kernel will buffer them).

Thanks for your explanation and sorry for my misunderstanding.

I'm running unicorn at production about one week, it works great, tnx
again for your work!

-- 
Regards,
Josh.Yin/殷海明
Friendfeed: http://friendfeed.com/yinhm
_______________________________________________
mongrel-unicorn mailing list
mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn

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

end of thread, other threads:[~2009-11-04  5:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-03  9:44 workers does not seems to exit when served one client HaiMing Yin
2009-11-03 16:56 ` Eric Wong
2009-11-04  5:33   ` HaiMing Yin

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

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).