Search squid archive

Re: --foreground vs -N

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/18/19 4:24 PM, B. Cook wrote:
> Would you suggest I go back to -N?

I cannot make a specific recommendation due to insufficient information.

In general, --foreground is meant for startup scripts, while -N is meant
for triage and development. For example, scripts using --foreground
would not need to be rewritten when the admin enables SMP features (or
if they become enabled by default).

However, if, in your environment, squid-N performs much better, then
recommending that you switch to --foreground would be silly! If you
gather sufficient proof of poor performance, you should file a bug
report instead (and/or sponsor the fix).


> Squid Cache: Version 5.0.0-20190909-ra70e75b76

> root:/dev/shm # ls -al
>     393232 2019-09-18 15:15 squid-cache_mem_ex.shm
>    3145840 2019-09-18 16:16 squid-cache_mem_map_anchors.shm
>     131080 2019-09-18 15:15 squid-cache_mem_map_filenos.shm
>     262156 2019-09-18 15:15 squid-cache_mem_map_slices.shm
>     131112 2019-09-18 15:15 squid-cache_mem_space.shm
>          8 2019-09-18 15:15 squid-cf__metadata.shm
>      32852 2019-09-18 15:15 squid-cf__queues.shm
>         52 2019-09-18 15:15 squid-cf__readers.shm
> 1073872936 2019-09-18 15:15 squid-squid-page-pool.shm
>    1572976 2019-09-18 15:25 squid-transients_map_anchors.shm
>      65544 2019-09-18 15:15 squid-transients_map_filenos.shm
>     131084 2019-09-18 15:15 squid-transients_map_slices.shm

> is this 'buggy' as well?

* If the above segments were created by a single-worker Squid without
any special squid.conf directives (i.e., Squid configured as you have
shown earlier), then, yes, it is very buggy.

* If the above segments were created by Squid configured with multiple
workers and started with -N, then, yes, it is very buggy.

* If the above segments were created by Squid configured with multiple
workers and started without -N, then creation of all those shared memory
segments is expected and does not indicate a bug. I suspect that is what
you have tested.


HTH,

Alex.


> On Wed, Sep 18, 2019 at 4:14 PM Alex Rousskov wrote:
>>
>> On 9/18/19 3:37 PM, B. Cook wrote:
>>
>>> this is /dev/shm with --foreground (no workers)
>>
>>> -rw-------  1 proxy proxy    8 2019-09-18 10:30 squid-cf__metadata.shm
>>> -rw-------  1 proxy proxy 8216 2019-09-18 10:30 squid-cf__queues.shm
>>> -rw-------  1 proxy proxy   36 2019-09-18 10:30 squid-cf__readers.shm
>>
>> Your Squid is buggy: These collapsed forwarding shared memory segments
>> should not be created for non-SMP configurations. Using these collapsed
>> forwarding segments might slow down a non-SMP Squid instance, but I do
>> not know whether they are actually _used_. I suspect they are not.
>>
>> The latest (future v5) Squid has the same bug AFAICT.
>>
>> Unfortunately, in my future-v5 tests, the same or similar bug exists in
>> Squids started with -N, so this bug is probably not a good suspect in
>> your investigation. I have no other suspects to offer at this time.
>>
>> Alex.
>>
>>
>>> On Wed, Sep 18, 2019 at 2:38 PM Alex Rousskov wrote:
>>>
>>>> One thing you may want to check is whether your --foreground Squid is
>>>> creating shared memory segments (look in /dev/shm/ or equivalent).
>>>> Creating shared memory segments in non-SMP configurations is a bug.
>>>> IIRC, we have fixed one or two of those bugs, but there may be more, and
>>>> using shared memory tables can decrease performance of non-SMP
>>>> configurations (there is no free lunch).
>>
>> _______________________________________________
>> squid-users mailing list
>> squid-users@xxxxxxxxxxxxxxxxxxxxx
>> http://lists.squid-cache.org/listinfo/squid-users
> 
> 
> 

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux