Lentitud de conexiones por internet Apache,php-fpm
Buenas: A ver si se me iluminan las neuronas escribiendo aquí. Tengo un servidor en producción con Apache, php-fpm, Mariadb y Nextcloud. El de pruebas Apache, php-fpm, slqite3 y Nextcloud. Mi problema es con la velocidad de subida de los ficheros. En LAN el de pruebas llega hasta 70MB/s usa unos 7/8 procesos de php-fpm el de producción llega a 50MB/s usa unos 5/6. Hasta aquí sería aceptable cualquiera. El problema es por internet donde en cualquiera de los dos la velocidad no pasa de 2,2MB/s y solo utilizan 1 hilo de php-fpm He probado con puerto redirigido y con una vpn y lo mismo. La velocidad de internet es 500 simétrico y he probado la vpn con webmin y el módulo de subir ficheros y llega hasta 20MB/s (este no usa php ni apache) Y mi pregunta: ¿cual es el parámetro/conjuro que hace que en LAN abra múltiples hilos de php-fpm y en WAN solo 1? Aún no encontré nada por internet sobre el tema. Saludos
On vie, set 1 2023 at 14:11:58 +0200, Francisco F. <admin-listas@satel-sa.com> wrote:
Buenas:
A ver si se me iluminan las neuronas escribiendo aquí.
Tengo un servidor en producción con Apache, php-fpm, Mariadb y Nextcloud.
El de pruebas Apache, php-fpm, slqite3 y Nextcloud.
Mi problema es con la velocidad de subida de los ficheros.
En LAN el de pruebas llega hasta 70MB/s usa unos 7/8 procesos de php-fpm
el de producción llega a 50MB/s usa unos 5/6.
Hasta aquí sería aceptable cualquiera.
El problema es por internet donde en cualquiera de los dos la velocidad no pasa de 2,2MB/s y solo utilizan 1 hilo de php-fpm
He probado con puerto redirigido y con una vpn y lo mismo.
La velocidad de internet es 500 simétrico y he probado la vpn con webmin y el módulo de subir ficheros y llega hasta 20MB/s (este no usa php ni apache)
Y mi pregunta: ¿cual es el parámetro/conjuro que hace que en LAN abra múltiples hilos de php-fpm y en WAN solo 1?
Aún no encontré nada por internet sobre el tema.
Saludos
Saludos, Google is your friend: https://stackoverflow.com/questions/56802878/how-to-set-up-php-fpm-multithre... Usé You.com, dio esta respuesta también: https://you.com/search?q=how+to+use+multiple+threads+with+php-fpm&tbm=youchat&fromExtension=true&cid=c0_47acdeae-85f0-47ac-b54a-90360d96292b indica que php-fpm no tiene soporte para multihilos, es un adminstrador de procesos y ejecuta varios workers... Y nada más. =) -- Carlos A. PS: No soy dev de PHP.
El 02/09/2023 a las 3:12, Carlos Ayala escribió:
On vie, set 1 2023 at 14:11:58 +0200, Francisco F. <admin-listas@satel-sa.com> wrote:
Buenas: A ver si se me iluminan las neuronas escribiendo aquí. Tengo un servidor en producción con Apache, php-fpm, Mariadb y Nextcloud. El de pruebas Apache, php-fpm, slqite3 y Nextcloud. Mi problema es con la velocidad de subida de los ficheros. En LAN el de pruebas llega hasta 70MB/s usa unos 7/8 procesos de php-fpm el de producción llega a 50MB/s usa unos 5/6. Hasta aquí sería aceptable cualquiera. El problema es por internet donde en cualquiera de los dos la velocidad no pasa de 2,2MB/s y solo utilizan 1 hilo de php-fpm He probado con puerto redirigido y con una vpn y lo mismo. La velocidad de internet es 500 simétrico y he probado la vpn con webmin y el módulo de subir ficheros y llega hasta 20MB/s (este no usa php ni apache) Y mi pregunta: ¿cual es el parámetro/conjuro que hace que en LAN abra múltiples hilos de php-fpm y en WAN solo 1? Aún no encontré nada por internet sobre el tema. Saludos
Saludos,
Google is your friend: https://stackoverflow.com/questions/56802878/how-to-set-up-php-fpm-multithre...
Usé You.com, dio esta respuesta también: https://you.com/search?q=how+to+use+multiple+threads+with+php-fpm&tbm=youchat&fromExtension=true&cid=c0_47acdeae-85f0-47ac-b54a-90360d96292b indica que php-fpm no tiene soporte para multihilos, es un adminstrador de procesos y ejecuta varios workers...
Y nada más. =)
-- Carlos A.
PS: No soy dev de PHP.
Gracias por responder. El enlace me sirvió para conocer Swoole y ReactPHP. De todas formas esa información es la normal para configurar php-fpm. Pero en mi caso no creo que eso tenga que ver ya que en LAN el sistema si utiliza varios procesos o workers y en WAN solo usa 1. Nextcloud cuando subes un archivo lo fragmenta y luego los une cuando están todos. Todos esos fragmentos los puede subir en paralelo como ocurre en LAN pero solo utiliza 1 cuando es desde internet. Y ahí está la cuestión de porque desde internet solo sube 1 y encima a 2MB/s cuando he comprobado con otros programas que con linea normal de 500Mb puede llegar a subir a 20MB/s No se si me he explicado porque a mi ya me cuesta entenderme. Saludos
On 2023-09-02 17:21, admin-listas wrote:
El 02/09/2023 a las 3:12, Carlos Ayala escribió:
On vie, set 1 2023 at 14:11:58 +0200, Francisco F. <> wrote:
Gracias por responder.
El enlace me sirvió para conocer Swoole y ReactPHP.
De todas formas esa información es la normal para configurar php-fpm. Pero en mi caso no creo que eso tenga que ver ya que en LAN el sistema si utiliza varios procesos o workers y en WAN solo usa 1.
Nextcloud cuando subes un archivo lo fragmenta y luego los une cuando están todos. Todos esos fragmentos los puede subir en paralelo como ocurre en LAN pero solo utiliza 1 cuando es desde internet.
Y ahí está la cuestión de porque desde internet solo sube 1 y encima a 2MB/s cuando he comprobado con otros programas que con linea normal de 500Mb puede llegar a subir a 20MB/s
No se si me he explicado porque a mi ya me cuesta entenderme.
A mi, sin conocer esa herramienta, me parece que debe ser intencionado. Interpreta que por internet no debe abusar, y solo usa un hilo en vez de veinte. -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.5 (Laicolasse))
El 3/9/23 a las 2:52, Carlos E. R. escribió:
On 2023-09-02 17:21, admin-listas wrote:
El 02/09/2023 a las 3:12, Carlos Ayala escribió:
On vie, set 1 2023 at 14:11:58 +0200, Francisco F. <> wrote:
Gracias por responder.
El enlace me sirvió para conocer Swoole y ReactPHP.
De todas formas esa información es la normal para configurar php-fpm. Pero en mi caso no creo que eso tenga que ver ya que en LAN el sistema si utiliza varios procesos o workers y en WAN solo usa 1.
Nextcloud cuando subes un archivo lo fragmenta y luego los une cuando están todos. Todos esos fragmentos los puede subir en paralelo como ocurre en LAN pero solo utiliza 1 cuando es desde internet.
Y ahí está la cuestión de porque desde internet solo sube 1 y encima a 2MB/s cuando he comprobado con otros programas que con linea normal de 500Mb puede llegar a subir a 20MB/s
No se si me he explicado porque a mi ya me cuesta entenderme.
A mi, sin conocer esa herramienta, me parece que debe ser intencionado. Interpreta que por internet no debe abusar, y solo usa un hilo en vez de veinte.
Pues sería de mala uva hacer eso y no documentarlo y mas siendo OS. Si hay que restringir velocidad ya lo haré yo si me interesa. Seguiré investigando.
El vie, 1 sept 2023 a las 9:28, Francisco F. (<admin-listas@satel-sa.com>) escribió:
Buenas:
A ver si se me iluminan las neuronas escribiendo aquí.
Tengo un servidor en producción con Apache, php-fpm, Mariadb y Nextcloud.
El de pruebas Apache, php-fpm, slqite3 y Nextcloud.
Mi problema es con la velocidad de subida de los ficheros.
En LAN el de pruebas llega hasta 70MB/s usa unos 7/8 procesos de php-fpm
el de producción llega a 50MB/s usa unos 5/6.
Hasta aquí sería aceptable cualquiera.
El problema es por internet donde en cualquiera de los dos la velocidad no pasa de 2,2MB/s y solo utilizan 1 hilo de php-fpm
He probado con puerto redirigido y con una vpn y lo mismo.
La velocidad de internet es 500 simétrico y he probado la vpn con webmin y el módulo de subir ficheros y llega hasta 20MB/s (este no usa php ni apache)
Y mi pregunta: ¿cual es el parámetro/conjuro que hace que en LAN abra múltiples hilos de php-fpm y en WAN solo 1?
Aún no encontré nada por internet sobre el tema.
Según puedo adivinar, el espacio de almacenamiento no está en tu propio servidor, sino en Nextcloud, por lo que la velocidad de transferencia tiene poco que ver con php-fpm. Creo que básicamente, la velocidad depende no solo del ancho de banda de los canales de datos contratados, sino en que país está tu servidor y en que país está el servidor Nextcloud que utilizas, por lo que la velocidad de transferencia final dependerá de 3 enlaces: 1- enlace usuario-servidor Apache 2- enlace usuario-Nextcloud 3- enlace servidor Apache-Nextcloud https://www.youtube.com/watch?v=nB9IpJhMKQo https://www.linode.com/community/questions/23214/how-to-increase-upload-spee... https://github.com/nextcloud-snap/nextcloud-snap/issues/1822 https://www.reddit.com/r/NextCloud/comments/sjtcji/performance_test_for_next... https://www.truenas.com/community/threads/problem-with-ddns-and-nextcloud-he... Salu2 -- USA LINUX OPENSUSE QUE ES SOFTWARE LIBRE, NO NECESITAS PIRATEAR NADA Y NI TE VAS A PREOCUPAR MAS POR LOS VIRUS Y SPYWARES: http://www.opensuse.org/es/ Puedes visitar mi blog en: http://jerbes.blogspot.com.ar/
El 3/9/23 a las 15:45, Juan Erbes escribió:
El vie, 1 sept 2023 a las 9:28, Francisco F. (<admin-listas@satel-sa.com>) escribió:
Buenas:
A ver si se me iluminan las neuronas escribiendo aquí.
Tengo un servidor en producción con Apache, php-fpm, Mariadb y Nextcloud.
El de pruebas Apache, php-fpm, slqite3 y Nextcloud.
Mi problema es con la velocidad de subida de los ficheros.
En LAN el de pruebas llega hasta 70MB/s usa unos 7/8 procesos de php-fpm
el de producción llega a 50MB/s usa unos 5/6.
Hasta aquí sería aceptable cualquiera.
El problema es por internet donde en cualquiera de los dos la velocidad no pasa de 2,2MB/s y solo utilizan 1 hilo de php-fpm
He probado con puerto redirigido y con una vpn y lo mismo.
La velocidad de internet es 500 simétrico y he probado la vpn con webmin y el módulo de subir ficheros y llega hasta 20MB/s (este no usa php ni apache)
Y mi pregunta: ¿cual es el parámetro/conjuro que hace que en LAN abra múltiples hilos de php-fpm y en WAN solo 1?
Aún no encontré nada por internet sobre el tema.
Según puedo adivinar, el espacio de almacenamiento no está en tu propio servidor, sino en Nextcloud, por lo que la velocidad de transferencia tiene poco que ver con php-fpm.
Creo que básicamente, la velocidad depende no solo del ancho de banda de los canales de datos contratados, sino en que país está tu servidor y en que país está el servidor Nextcloud que utilizas, por lo que la velocidad de transferencia final dependerá de 3 enlaces: 1- enlace usuario-servidor Apache 2- enlace usuario-Nextcloud 3- enlace servidor Apache-Nextcloud
https://www.youtube.com/watch?v=nB9IpJhMKQo
https://www.linode.com/community/questions/23214/how-to-increase-upload-spee...
https://github.com/nextcloud-snap/nextcloud-snap/issues/1822
https://www.reddit.com/r/NextCloud/comments/sjtcji/performance_test_for_next...
https://www.truenas.com/community/threads/problem-with-ddns-and-nextcloud-he...
Salu2
El servidor es totalmente mio y almacena toda la infraestructura para que funcione Nextcloud. En local va bien utilizando todos los procesos que hay para el sistema. Pero desde internet solo utiliza 1 proceso y encima a 2MB/s (líneas de prueba son de 600Mb/s). Hay gente con el mismo problema pero unos lo solucionan reinstalando todo o montando diversos dockers o virtuales pero sin saber que es lo que en realidad fallaba. A otros se les arregló con esto pero al actualizar se fastidio otra vez. Y si, le he configurado todos los parámetros que dice para mejorar, tan así que en el equipo de prueba pasé de 50 MB/s a 70 y el de producción de 30 a 48MB/s, siempre en la intranet. Todo un misterio Saludos
participants (5)
-
admin-listas
-
Carlos Ayala
-
Carlos E. R.
-
Francisco F.
-
Juan Erbes