Squid multithread

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Squid multithread

Eduardo Carneiro
Hi everyone!

I have a Squid 3.5.19 with dynamic content cache using url rewrite. It's a virtual machine (VMWare) with 2 quad-core processors each. Squid proccess is 100% in one of my eight cores and the access it's getting very slow.

There exists any way to compile squid with multithread option? The idea is spread this processing beetwen the 8 cores.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Squid multithread

Yuri Voinov
http://wiki.squid-cache.org/Features/SmpScale

http://wiki.squid-cache.org/MultipleInstances


14.11.2016 20:22, Eduardo Carneiro пишет:

> Hi everyone!
>
> I have a Squid 3.5.19 with dynamic content cache using url rewrite. It's a
> virtual machine (VMWare) with 2 quad-core processors each. Squid proccess is
> 100% in one of my eight cores and the access it's getting very slow.
>
> There exists any way to compile squid with multithread option? The idea is
> spread this processing beetwen the 8 cores.
>
> Thanks.
>
>
>
> --
> View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-multithread-tp4680488.html
> Sent from the Squid - Users mailing list archive at Nabble.com.
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users
--
Cats - delicious. You just do not know how to cook them.

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

0x613DEC46.asc (2K) Download Attachment
signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Squid multithread

Eduardo Carneiro
Yuri Voinov wrote
http://wiki.squid-cache.org/Features/SmpScale

http://wiki.squid-cache.org/MultipleInstances


14.11.2016 20:22, Eduardo Carneiro пишет:
> Hi everyone!
>
> I have a Squid 3.5.19 with dynamic content cache using url rewrite. It's a
> virtual machine (VMWare) with 2 quad-core processors each. Squid proccess is
> 100% in one of my eight cores and the access it's getting very slow.
>
> There exists any way to compile squid with multithread option? The idea is
> spread this processing beetwen the 8 cores.
>
> Thanks.
>
>
>
> --
> View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-multithread-tp4680488.html
> Sent from the Squid - Users mailing list archive at Nabble.com.
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users

--
Cats - delicious. You just do not know how to cook them.

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


0x613DEC46.asc (2K) <http://squid-web-proxy-cache.1019090.n4.nabble.com/attachment/4680489/0/0x613DEC46.asc>
signature.asc (484 bytes) <http://squid-web-proxy-cache.1019090.n4.nabble.com/attachment/4680489/1/signature.asc>
From what I understood I will need to use each instance in different ports, right? This does not solve my problem. There are any way to separate one instance for accesses and another for cache?
Reply | Threaded
Open this post in threaded view
|

Re: Squid multithread

Yuri Voinov



14.11.2016 21:59, Eduardo Carneiro пишет:
Yuri Voinov wrote
http://wiki.squid-cache.org/Features/SmpScale

http://wiki.squid-cache.org/MultipleInstances


14.11.2016 20:22, Eduardo Carneiro пишет:
Hi everyone!

I have a Squid 3.5.19 with dynamic content cache using url rewrite. It's
a
virtual machine (VMWare) with 2 quad-core processors each. Squid proccess
is
100% in one of my eight cores and the access it's getting very slow.

There exists any way to compile squid with multithread option? The idea
is
spread this processing beetwen the 8 cores.

Thanks.



--
View this message in context:
http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-multithread-tp4680488.html
Sent from the Squid - Users mailing list archive at Nabble.com.
_______________________________________________
squid-users mailing list


      
[hidden email]

      
http://lists.squid-cache.org/listinfo/squid-users
-- 
Cats - delicious. You just do not know how to cook them.

_______________________________________________
squid-users mailing list

      
[hidden email]

      
http://lists.squid-cache.org/listinfo/squid-users


0x613DEC46.asc (2K)
&lt;http://squid-web-proxy-cache.1019090.n4.nabble.com/attachment/4680489/0/0x613DEC46.asc&gt;
signature.asc (484 bytes)
&lt;http://squid-web-proxy-cache.1019090.n4.nabble.com/attachment/4680489/1/signature.asc&gt;
From what I understood I will need to use each instance in different ports,
right? This does not solve my problem. There are any way to separate one
instance for accesses and another for cache?

What can workers share?

Using Coordinator and common configuration files, Squid workers can receive identical configuration information and synchronize some of their activities. By default, Squid workers share the following: 

  • Squid executable, 
  • general configuration, 
  • listening ports (but shared ICP and HTCP ports do not work well; see below), 
  • logs, 
  • memory object cache (in most environments), 
  • disk object cache (with Rock Store only), 
  • insecure cache manager statistics (detailed elsewhere), 

  • SNMP statistics.

Cache indexes are shared without copying. Other shared information is usually small in terms of RAM use and is essentially copied to avoid locking and associated performance overheads. 

Conditional configuration and worker-dependent macros can be used to limit sharing. For example, each worker can be given a dedicated http_port to listen on. 

Currently, Squid workers do not share and do not synchronize other resources and services, including (but not limited to): 

  • memory object cache (in some environments), 
  • disk object cache (except for Rock Store), 
  • DNS caches (ipcache and fqdncache), 
  • helper processes and daemons, 
  • stateful HTTP authentication (e.g., digest authentication; see bug 3517), 

  • delay pools, 
  • SSL session cache (there is an active project to allow session sharing among workers), 
  • secure cache manager statistics (detailed elsewhere), 

  • ICP/HTCP (works with a caveat: If multiple workers share the same ICP/HTCP port, an ICP/HTCP response may not go the worker that sent the request, causing timeouts at the requesting worker; use a dedicated ICP/HTCP port as a workaround). 

Some SMP-unaware features continue to work in SMP mode (e.g., DNS responses are going to be cached by individual workers), but their performance suffers from the lack of synchronization and they require more resources due to duplication of information (e.g., each worker may independently resolve and cache the IP of the same domain name). Some SMP-unaware features break badly (e.g., ufs-based cache_dirs become corrupted) unless squid.conf conditionals are used to prevent such breakage. Some SMP-unaware features will appear to work but will do so incorrectly (e.g., delay pools will limit bandwidth on per-worker basis, without sharing traffic information among workers and without dividing bandwidth limits among workers).




--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-multithread-tp4680488p4680490.html
Sent from the Squid - Users mailing list archive at Nabble.com.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

--
Cats - delicious. You just do not know how to cook them.

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

0x613DEC46.asc (2K) Download Attachment
signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Squid multithread

Yuri Voinov
In reply to this post by Eduardo Carneiro



14.11.2016 21:59, Eduardo Carneiro пишет:
Yuri Voinov wrote
http://wiki.squid-cache.org/Features/SmpScale

http://wiki.squid-cache.org/MultipleInstances


14.11.2016 20:22, Eduardo Carneiro пишет:
Hi everyone!

I have a Squid 3.5.19 with dynamic content cache using url rewrite. It's
a
virtual machine (VMWare) with 2 quad-core processors each. Squid proccess
is
100% in one of my eight cores and the access it's getting very slow.

There exists any way to compile squid with multithread option? The idea
is
spread this processing beetwen the 8 cores.

Thanks.



--
View this message in context:
http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-multithread-tp4680488.html
Sent from the Squid - Users mailing list archive at Nabble.com.
_______________________________________________
squid-users mailing list


      
[hidden email]

      
http://lists.squid-cache.org/listinfo/squid-users
-- 
Cats - delicious. You just do not know how to cook them.

_______________________________________________
squid-users mailing list

      
[hidden email]

      
http://lists.squid-cache.org/listinfo/squid-users


0x613DEC46.asc (2K)
&lt;http://squid-web-proxy-cache.1019090.n4.nabble.com/attachment/4680489/0/0x613DEC46.asc&gt;
signature.asc (484 bytes)
&lt;http://squid-web-proxy-cache.1019090.n4.nabble.com/attachment/4680489/1/signature.asc&gt;
From what I understood I will need to use each instance in different ports,
right? This does not solve my problem. There are any way to separate one
instance for accesses and another for cache?

Who decides which worker gets the request?

All workers that share http_port listen on the same IP address and TCP port. The operating system protects the shared listening socket with a lock and decides which worker gets the new HTTP connection waiting to be accepted. Once the incoming connection is accepted by the worker, it stays with that worker.




--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-multithread-tp4680488p4680490.html
Sent from the Squid - Users mailing list archive at Nabble.com.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

--
Cats - delicious. You just do not know how to cook them.

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

0x613DEC46.asc (2K) Download Attachment
signature.asc (484 bytes) Download Attachment