Re: [squid-users] Squid-Cache VS PHP, put some things in perspective

2022-04-24 Thread Eliezer Croitoru
Hey Amos,

I am testing the session helper now for quite some time and it seems that
there is not memory leak and the helpers seems to run pretty stable for the
last days.
I will continue to run the test since it doesn't cause any issues for my
proxy at all, not in performance and not in any helpers crashes.

Eliezer


Eliezer Croitoru
NgTech, Tech Support
Mobile: +972-5-28704261
Email: ngtech1...@gmail.com

-Original Message-
From: squid-users  On Behalf Of
Amos Jeffries
Sent: Thursday, April 14, 2022 07:18
To: squid-users@lists.squid-cache.org
Subject: Re: [squid-users] Squid-Cache VS PHP, put some things in
perspective

On 13/04/22 10:30, Eliezer Croitoru wrote:
> 
> I am looking for adventurous Squid Users which wants to help me test if 
> PHP 7.4+ still possess the same old 5.x STDIN bugs.
> 


Hi Eliezer, Thanks for taking on a re-investingation.


FTR, the old problem was not stdin itself. The issue was that PHP was 
designed with the fundamental assumption that it was used for scripts 
with very short execution times. Implying that all resources used would 
be freed quickly.

This assumption resulted in scripts (like helpers) which need to run for 
very long times having terrible memory and resource consumption side 
effects. Naturally that effect alone compounds badly when Squid attempts 
to run dozens or hundreds of helpers at once.

Later versions (PHP-3/4/5) that I tested had various attempts at 
internal Zend engine controls to limit the memory problems. Based on the 
same assumption though, so they chose to terminate helpers early. Which 
still causes Squid issues. PHP config settings for that Zend timeout 
were unreliable.


AFAIK, That is where we are with knowledge of PHP vs helper usage. 
PHP-6+ have not had any serious testing to check if the language updates 
have improved either resource usage or the Zend timeout/abort behaviour.


HTH
Amos
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users

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


Re: [squid-users] Squid-Cache VS PHP, put some things in perspective

2022-04-17 Thread Eliezer Croitoru
OK so I have created a vagrant simple proxy:
https://github.com/elico/squid-php-helper-tests

It works with REDIS and can be tunned for production use.
It's based on Oracle Enterprise Linux 8 and seems to do the job.
Anyone is interested in trying to help testing if PHP is still leaking?

Thanks,
Eliezer


Eliezer Croitoru
NgTech, Tech Support
Mobile: +972-5-28704261
Email: ngtech1...@gmail.com

-Original Message-
From: squid-users  On Behalf Of
Amos Jeffries
Sent: Thursday, April 14, 2022 07:18
To: squid-users@lists.squid-cache.org
Subject: Re: [squid-users] Squid-Cache VS PHP, put some things in
perspective

On 13/04/22 10:30, Eliezer Croitoru wrote:
> 
> I am looking for adventurous Squid Users which wants to help me test if 
> PHP 7.4+ still possess the same old 5.x STDIN bugs.
> 


Hi Eliezer, Thanks for taking on a re-investingation.


FTR, the old problem was not stdin itself. The issue was that PHP was 
designed with the fundamental assumption that it was used for scripts 
with very short execution times. Implying that all resources used would 
be freed quickly.

This assumption resulted in scripts (like helpers) which need to run for 
very long times having terrible memory and resource consumption side 
effects. Naturally that effect alone compounds badly when Squid attempts 
to run dozens or hundreds of helpers at once.

Later versions (PHP-3/4/5) that I tested had various attempts at 
internal Zend engine controls to limit the memory problems. Based on the 
same assumption though, so they chose to terminate helpers early. Which 
still causes Squid issues. PHP config settings for that Zend timeout 
were unreliable.


AFAIK, That is where we are with knowledge of PHP vs helper usage. 
PHP-6+ have not had any serious testing to check if the language updates 
have improved either resource usage or the Zend timeout/abort behaviour.


HTH
Amos
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users

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


Re: [squid-users] Squid-Cache VS PHP, put some things in perspective

2022-04-13 Thread Amos Jeffries

On 13/04/22 10:30, Eliezer Croitoru wrote:


I am looking for adventurous Squid Users which wants to help me test if 
PHP 7.4+ still possess the same old 5.x STDIN bugs.





Hi Eliezer, Thanks for taking on a re-investingation.


FTR, the old problem was not stdin itself. The issue was that PHP was 
designed with the fundamental assumption that it was used for scripts 
with very short execution times. Implying that all resources used would 
be freed quickly.


This assumption resulted in scripts (like helpers) which need to run for 
very long times having terrible memory and resource consumption side 
effects. Naturally that effect alone compounds badly when Squid attempts 
to run dozens or hundreds of helpers at once.


Later versions (PHP-3/4/5) that I tested had various attempts at 
internal Zend engine controls to limit the memory problems. Based on the 
same assumption though, so they chose to terminate helpers early. Which 
still causes Squid issues. PHP config settings for that Zend timeout 
were unreliable.



AFAIK, That is where we are with knowledge of PHP vs helper usage. 
PHP-6+ have not had any serious testing to check if the language updates 
have improved either resource usage or the Zend timeout/abort behaviour.



HTH
Amos
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


[squid-users] Squid-Cache VS PHP, put some things in perspective

2022-04-12 Thread Eliezer Croitoru
Hey Everybody,

 

Since I know Squid-Cache I remember hearing over and over to not use PHP
however it's a great language.

I had the pleasure of hearing a talk from the creator of PHP and it gave me
couple answers to my doubts and
I wanted to say couple good words about PHP.

 

First the talk is available at the next link:

https://youtu.be/wCZ5TJCBWMg

 

Title: 25 Years of PHP (by the Creator of PHP)

Description: PHP has been around for almost as long as the Web. 25 years!

Join me for a fun look at the highlights (and lowlights) of this crazy trip.
But I will also be trying to convince you to upgrade your PHP version. 

The performance alone should be enough, if not, I have a few other tricks up
my sleeve to try to win you over.

Performance optimization, static analysis, zero-cost profiling, dead code
elimination and escape analysis are just some of the concepts that will be
covered.

 

EVENT:

 

phpday 2019 | Verona, May 10-11th | phpday.it

 

SPEAKER:

 

Rasmus Lerdorf

 

PUBLICATION PERMISSIONS:

 

Original video was published with the Creative Commons license.

## END OF SECTION

 

PHP is a good language if not one of the best languages ever made.

And I can see daily how it gives many parts of the internet and the world to
just work and make the world a better place.
(There are. bad uses for anything good..)

I have been using Squid-Cache for the last 14 ~ years for many things and I
am really not a programmer.

I actually didn't even like to code and I have seen uses of PHP which amazed
me all these years.

For theses who want to run a squid helper with PHP you just need to
understand that PHP was not built for this purpose.

I assume that the availability of PHP helpers examples and the simplicity of
the language technical resources might be the cause of this.

 

I want to run a test of a PHP helper with PHP 7.4 and PHP 8.0 , they both
contains couple amazing improvements but needs to be tested.

The next Skelton:

https://gist.githubusercontent.com/elico/5d1cc6dceebbe7ae8f6cedf158396905/ra
w/1655125419b5063477723f9f1687167afd003665/fake-helper.php

 

Is a fake PHP helper for the tests.

I really recommend on other languages and other ways to implement a helper
solution but if we will be able to test this it's possible
that the conclusions will be more then satisfying to prove if the language
issues were fixed.

 

I need an idea for a testing helper and was thinking about a basic session
helper.

 

I my last take of a session helper what I did was to write the next:

https://wiki.squid-cache.org/EliezerCroitoru/SessionHelper

https://wiki.squid-cache.org/EliezerCroitoru/SessionHelper/Conf

https://wiki.squid-cache.org/EliezerCroitoru/SessionHelper/PhpLoginExample

https://wiki.squid-cache.org/EliezerCroitoru/SessionHelper/Python

https://wiki.squid-cache.org/EliezerCroitoru/SessionHelper/SplashPageTemplat
e

 

And I have also seen that there are couple examples for the:

readline_callback_handler_install

 

function in PHP which might result in a solution for the problem.

 

I am looking for adventurous Squid Users which wants to help me test if PHP
7.4+ still possess the same old 5.x STDIN bugs.

 

Thanks,

Eliezer

 



Eliezer Croitoru

NgTech, Tech Support

Mobile: +972-5-28704261

Email:   ngtech1...@gmail.com

 

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