Re: When can we make Squid using multi-CPU?

From: ShuXin Zheng <zhengshuxin_at_gmail.com>
Date: Mon, 5 Jan 2009 09:45:47 +0800

I've ever do this to run multi-squid on one machine which can use multi-CPU,
but can't share the same store-fs, and must configure multi-IP on the same
machine. Can we rewrite squid as follow:

thread0(client side, no block, can accept many connections) thread1
...threadn(n=CPU number)
   |
                      |
   v
                     v
access check
       access check
  |
                     |
  v
                    v
http header parse
       http header parse
  |
                     |
  v
                    v
acl filter
               acl filter
  |
                     |
  v
                    v
check local cache
      check local cache
  |
                     |
  v
                    v
-----------------------------------------------------------------------------------------------
                                              |
neighbor----| | |-----ufs
webserver--|------- forward --------- |--------store fs ----|-----aufs
                | |
|-----coss
-----------------------------------------------------------------------------------------------
  |(thread0)
                  |(thread1) ......
  v
                     v
 ...
                    ....

2009/1/4 <anesthes_at_cisdi.com>:
>
> I've found the best way is to run multiple copies of squid on a single
> machine, and use LVS to load balance between the squid processes.
>
> -- Joe
>
> Quoting Adrian Chadd <adrian_at_squid-cache.org>:
>
>> when someone decides to either help code it up, or donate towards the
>> effort.
>>
>>
>>
>> adrian
>>
>> 2009/1/3 ShuXin Zheng <zhengshuxin_at_gmail.com>:
>>>
>>> Hi, Squid current can only use one CPU, but multi-CPU hardware
>>> machines are so popular. These are so greatly wastely. How can we use
>>> the multi-CPU? Can we separate some parallel sections which are CPU
>>> wasting to run on different CPU? OMP(http://openmp.org/wp/) gives us
>>> some thinking about using multi-CPU, so can we use these technology in
>>> Squid?
>>>
>>> Thanks
>>>
>>> --
>>> zsxxsz
>>>
>>>
>>
>
>
>
>

-- 
zsxxsz
Received on Mon Jan 05 2009 - 01:45:51 MST

This archive was generated by hypermail 2.2.0 : Mon Jan 05 2009 - 12:00:03 MST