Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"In short, _N is Richardian if, and only if, _N is not Richardian."


computers / Rocksolid Nodes Help / php and performance

SubjectAuthor
* php and performancetrw
+* php and performanceAnonUser
|+- php and performanceAnonUser
|`- php and performanceAnonUser
`* php and performanceRetro Guy
 `- php and performancetrw

1
php and performance

<qpu8r2$tdf$1@i2pn2.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=14&group=rocksolid.nodes.help#14

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!.POSTED!not-for-mail
From: trw@i2pmail.org (trw)
Newsgroups: rocksolid.nodes.help
Subject: php and performance
Date: Wed, 06 Nov 2019 05:55:23 -0500
Organization: Dancing elephants
Lines: 11
Message-ID: <qpu8r2$tdf$1@i2pn2.org>
Reply-To: trw <trw@i2pmail.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 6 Nov 2019 10:55:31 -0000 (UTC)
Injection-Info: i2pn2.org; posting-account="def.i2p";
logging-data="30127"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: FUDforum 3.0.7
X-FUDforum: 6666cd76f96956469e7be39d750cc7d9 <115448>
 by: trw - Wed, 6 Nov 2019 10:55 UTC

what are the opinions about the best way to run php for a forum like this or rslight ?
explanation:

due to the recent performance problems of both def2 and def3 (both threw a lot of 503s recently, this has gone away now), i have researched a bit about the best setup to run php ("the best" is relative to my needs of course: so: a modest number of users and messages, running the server on a vm hosted on modest hardware, with a limited up/download speed).
on the old machine, def3 used to run with nginx as webserver, connected to php-fpm over a system socket, and that worked fine. now i use lighttpd with php-cgi, and it seems to work fine as well (the performance problems came in fact from some daemons running wild that had nothing to do with the webserver or php).
def2 ran with lighttpd/php-cgi from the start, with mixed perfromance.
i understand that php-cgi is outdated, and fcgi is recommended. from php, the fcgi implemention in php (php-fpm) is recommended. on the other hand, i don't mind running outdated software if it does the job, which seems to be the case right now. php-fpm in combination with nginx also had a vuln recently (potential remote root access), so newer is not necessarily better. there are also much more parameters to adjust, which is fine if you know what you are doing, but makes it more complex.
So what are the opinions around ? What is your experience ? And if you use php-fpm, what are your settings ?

cheers

trw
Posted on def3

Re: php and performance

<6de605dbffd7d417ecce1bf0b7b87bfd$1@retrobbs.i2p>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=15&group=rocksolid.nodes.help#15

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!rocksolid3!.POSTED.localhost!not-for-mail
From: anonuser@retrobbs.rocksolidbbs.com.remove-ycs-this (AnonUser)
Newsgroups: rocksolid.nodes.help
Subject: Re: php and performance
Date: Thu, 7 Nov 2019 00:11:42 +0000
Organization: RetroBBS
Message-ID: <6de605dbffd7d417ecce1bf0b7b87bfd$1@retrobbs.i2p>
References: <qpu8r2$tdf$1@i2pn2.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: rocksolidbbs.com; posting-host="localhost:127.0.0.1";
logging-data="12045"; mail-complaints-to="usenet@rocksolidbbs.com"
User-Agent: rslight (http://news.novabbs.com)
To: trw
X-Comment-To: trw
In-Reply-To: <qpu8r2$tdf$1@i2pn2.org>
X-FTN-PID: Synchronet 3.17a-Linux Dec 29 2018 GCC 6.3.0
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on rocksolidbbs.com
X-Rslight-Site: $2y$10$ZNnVr1apeCR1NSJiWhN2JOSEUfIKKVKLDggfATfrRoppdl12Qx6Y2
X-Gateway: retrobbs.rocksolidbbs.com [Synchronet 3.17a-Linux NewsLink 1.110]
 by: AnonUser - Thu, 7 Nov 2019 00:11 UTC

To: trw
I doubt switching from php-cgi to fcgi would make much of a difference as
you've already determined that it's about as fast as it was before. I
always ran apache back in the day, but nginx had better performance so I
moved over to that together with fcgi. Don't know about lighthttpd.

It is quite difficult giving performance advice when you don't know the
machine or the specific setup in question. It looks like you are running
FUDForum, but possibly also heavily modified? Whenever I had performance
issues with forum software, then it was generally due to the database and
not PHP or the web server per se. Not enough RAM, fragmented tables, bad
queries, thrashing the hard disk... some of my performance issues were bad
custom modifications that brought my server thrashing down lol.

My bet for performance issues is usually the database, and likely RAM or
hard disk related. It's usually the case.

Excessive logging can also be an offender that many do not suspect,
especially on hard drives with spinny disks.

>with a limited up/download speed
I don't know how limited, but in that case I would gzip compress the pages.

>on the other hand, i don't mind running outdated software
It's fine if you get security patches, but you may be missing out on some
performance improvements. Do you use PHP 7? If not, then you should. It's
twice as fast as previous versions of PHP due to JIT compilation with
optimizations and it also uses less memory.

- crowbar
--
Posted on RetroBBS

Re: php and performance

<ab260503f8a0428664f5b2ff695d2ff4$1@retrobbs.i2p>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=16&group=rocksolid.nodes.help#16

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!rocksolid3!.POSTED.localhost!not-for-mail
From: anonuser@retrobbs.rocksolidbbs.com.remove-96y-this (AnonUser)
Newsgroups: rocksolid.nodes.help
Subject: Re: php and performance
Date: Thu, 7 Nov 2019 00:28:51 +0000
Organization: RetroBBS
Message-ID: <ab260503f8a0428664f5b2ff695d2ff4$1@retrobbs.i2p>
References: <6de605dbffd7d417ecce1bf0b7b87bfd$1@retrobbs.i2p>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: rocksolidbbs.com; posting-host="localhost:127.0.0.1";
logging-data="14343"; mail-complaints-to="usenet@rocksolidbbs.com"
User-Agent: rslight (http://news.novabbs.com)
To: AnonUser
X-Comment-To: AnonUser
In-Reply-To: <6de605dbffd7d417ecce1bf0b7b87bfd$1@retrobbs.i2p>
X-FTN-PID: Synchronet 3.17a-Linux Dec 29 2018 GCC 6.3.0
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on rocksolidbbs.com
X-Rslight-Site: $2y$10$mEz5AoGNTkXXo923lMpk1uGJHXZFFphWi3LRv8qvnyQs1PlJVZQAa
X-Gateway: retrobbs.rocksolidbbs.com [Synchronet 3.17a-Linux NewsLink 1.110]
 by: AnonUser - Thu, 7 Nov 2019 00:28 UTC

To: AnonUser
Forgot to add: what usually makes a big difference is the amount of worker
processes and how many connections per process. The setting is very
dependent on your hardware and will have to be configured accordingly.

Too many processes and they'll be waiting on IO, too few and your hardware
will be idle during requests (where it's processing).

PS: I don't run synchronet bbss, but if they're anything like normal web
forums that access a database then it should theoretically also apply. I
assume they would sync in the background in addition to the normal forum
software tasks..
--
Posted on RetroBBS

Re: php and performance

<4d0e203a67a717f356fce8737ee66a65$1@rslight.i2p>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=17&group=rocksolid.nodes.help#17

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!rocksolid2!.POSTED.localhost!not-for-mail
From: AnonUser@rslight.i2p (AnonUser)
Newsgroups: rocksolid.nodes.help
Subject: Re: php and performance
Date: Fri, 8 Nov 2019 21:06:22 -0000 (UTC)
Organization: Rocksolid Light
Message-ID: <4d0e203a67a717f356fce8737ee66a65$1@rslight.i2p>
References: <qpu8r2$tdf$1@i2pn2.org> <6de605dbffd7d417ecce1bf0b7b87bfd$1@retrobbs.i2p>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Nov 2019 21:06:22 -0000 (UTC)
Injection-Info: novabbs.com; posting-account="retrobbs1"; posting-host="localhost:127.0.0.1";
logging-data="7569"; mail-complaints-to="usenet@novabbs.com"
User-Agent: rslight (http://news.novabbs.com)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Spam-Level: *
X-Rslight-Site: $2y$10$b0RcLOiVJTN8D1qc0nQafexioKOJPgEPnQNWWLQerd.vcgnjElmAq
 by: AnonUser - Fri, 8 Nov 2019 21:06 UTC

>I doubt switching from php-cgi to fcgi would make much of a difference as
>you've already determined that it's about as fast as it was before.

Well, I thought it would be, but right it seems back to the old 503.

> I always ran apache back in the day, but nginx had better performance so I
>moved over to that together with fcgi. Don't know about lighthttpd.

Well, google used to run lighttpd, so it should handle heavy loads pretty
good, as long as it is configured correctly for the use case i guess.

>It is quite difficult giving performance advice when you don't know the
>machine or the specific setup in question.

yeah, of course. the servers run as virtual machines with qemu. some part
of the problem might be linked to configuration of the vms as well.

>It looks like you are running FUDForum, but possibly also heavily modified?

Exactly. Heavily depends on definition of course, but yes, there are
hacks/mods applied for:
-nntp updates
-session management
-string filtering
-some admin functions (batch creation of groups and update rules)
-the theme of course (took out some functionality)
The reason might be in that as well (or part of it).

>Whenever I had performance issues with forum software, then it was generally
>due to the database and not PHP or the web server per se. Not enough RAM,
>fragmented tables, bad queries, thrashing the hard disk... some of my
>performance issues were bad custom modifications that brought my server
>thrashing down lol.

I guess I can start searching for any of those as well....maybe it will
also help to muscle up a bit on the RAM and CPU, just in case.

>Excessive logging can also be an offender that many do not suspect,
>especially on hard drives with spinny disks.

This caused one of the recent server crashes. Good thing we are federated
:-)

> Do you use PHP 7?

yep.

Thanks for your feedback so far, I will check some stuff and report back.

trw
--
Posted on Rocksolid Light

Re: php and performance

<e95400a52e6deec2f2efd6a6010bd477$1@news.novabbs.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=18&group=rocksolid.nodes.help#18

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!rocksolid2!.POSTED.localhost!not-for-mail
From: Retro Guy@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.nodes.help
Subject: Re: php and performance
Date: Fri, 8 Nov 2019 21:21:46 -0000 (UTC)
Organization: Rocksolid Light
Message-ID: <e95400a52e6deec2f2efd6a6010bd477$1@news.novabbs.com>
References: <qpu8r2$tdf$1@i2pn2.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Nov 2019 21:21:46 -0000 (UTC)
Injection-Info: novabbs.com; posting-account="retrobbs1"; posting-host="localhost:127.0.0.1";
logging-data="13307"; mail-complaints-to="usenet@novabbs.com"
User-Agent: rslight (http://news.novabbs.com)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$Hrf.VcV5Y8B9BZxxqPBCP.A02ai6xbmet4ILOs4E6TIKtGcHhze/u
 by: Retro Guy - Fri, 8 Nov 2019 21:21 UTC

I'm using php-fpm for my servers. I originally used the built in php
support in apache, but had problems with heavy resource use. php-fpm seems
to take care of this fine.

I discovered this mainly because all the sites on retroBBS run using
Synchronet as the web server, and it was much more stable and reliable
than the apache servers. Synchronet uses php-fpm.

Once switching apache to use php-fpm it was a lot better, but still had to
modify mpm_prefork to kill processes eventually (after a certain number of
uses). This seems to have made the biggest impact on stability.

I have used lighttpd and it has worked well. It seems to handle things
exactly as the Synchronet server. Apache is a beast, but I still use it as
I'm familiar with config etc., but it does take some tweaking to run well.

Retro Guy

--
Posted on Rocksolid Light

Re: php and performance

<qq693m$1gg$1@i2pn2.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=19&group=rocksolid.nodes.help#19

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!.POSTED!not-for-mail
From: trw@i2pmail.org (trw)
Newsgroups: rocksolid.nodes.help
Subject: Re: php and performance
Date: Sat, 09 Nov 2019 06:49:10 -0500
Organization: Dancing elephants
Lines: 1
Message-ID: <qq693m$1gg$1@i2pn2.org>
References: <e95400a52e6deec2f2efd6a6010bd477$1@news.novabbs.com>
Reply-To: trw <trw@i2pmail.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Nov 2019 11:49:11 -0000 (UTC)
Injection-Info: i2pn2.org; posting-account="def.i2p";
logging-data="1552"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: FUDforum 3.0.7
X-FUDforum: 6666cd76f96956469e7be39d750cc7d9 <122304>
 by: trw - Sat, 9 Nov 2019 11:49 UTC

it seems like the database is the main component to cause the fuckups. corrupted tables (which i could repair) and still the importing problem of some outlandish characters causing collation errors.

Posted on def3


computers / Rocksolid Nodes Help / php and performance

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor