Re: Too very slow pages on ic 5.10.0
David Christensen <[email protected]> Mon, 12 Mar 2018 08:20:48 -0500
| Newsgroups | gmane.comp.web.interchange.users |
|---|---|
| Message-ID | <[email protected]> |
> On Mar 11, 2018, at 11:01 PM, Mike Heins <[email protected]> wrote: > > Quoting Peter ([email protected] <mailto:[email protected]>): >> On 11/03/18 01:44, marco wrote: >>> after 3 months of installation and light use my old production catalogue >>> with: >> >>> I notice that for the pages with heavy query became very slow and >>> sometimes bring to "Gateway Timeout" >>> "top" utility display cpu to 100% during page wait sometimes for mysql >>> and sometimes for interchange >> >> You need to benchmark the code on the problematic pages and find out >> exactly which lines or blocks of code are causing the issue. >> >> This is most likely going to be the result of lots of DB hits from some >> very inefficient code. Look for calls to [data] or [field], or similar >> tags that waste db hits inside of a [loop] or similar. Rewrite your >> code so that it does a single query to the db to get all the data you >> need instead and it will end up being way more efficient. > > Don't discount the possibility that the I/O on this virtual instance > is slower than on the other one. Are there demanding applications which > show the same speed on the new container? Try doing some large DB queries > on both the old and the new and comparing. With newer perls, my personal experience is that parsing slowdowns are caused by using regexes against Unicode strings. If you’re using PostgreSQL with DBD::Pg >= 3, this can also materialize itself *even without* explicit configuration on the interchange side (i.e., MV_UTF8 and friends). If this matches your situation: Newer perl, PostgreSQL, DBD::Pg >= 3 (*no* MV_UTF8 configuration) you can turn off the automatic unicodization of database data via this in your catalog.cfg: DatabaseDefault PG_ENABLE_UTF8 0 The issue is that DBD::Pg >= 3 by default will automatically decode any data it pulls from the server if the client_encoding is UTF8, unless you explicitly disable that functionality, which means that any page where IC interpolates data that came from the database will have the page string upgraded to Unicode, which will take the slower regex path. This is particularly noticeable in perls ~ 5.14 - 5.20, but is still substantially slower than the non-unicode path in 5.24. Not sure if that might help explain things, but this is something we’ve run into with recent perls. Additionally, the normal database optimization approaches mentioned elsewhere in this thread will also always be good too. Best, David -- David Christensen End Point Corporation [email protected] 785-727-1171 _______________________________________________ interchange-users mailing list [email protected] http://www.icdevgroup.org/mailman/listinfo/interchange-users
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEECKA1l4YEfF4eK4/eN0ojyd+bZbgFAlqmfrAACgkQN0ojyd+b Zbhy9Q/8Cogv/6Ekkc5RuY4Ayc0sV9GrYdLiGhePcSncG3FRWMotn6V+RFC+jlf4 yZWnV+qQAvHeXHyDGltHFQsvF50q75WjwtMfuvoGSybs+WnkmayIwrJS+JGYgWTz TuOMYZ40K7haJSzs+RAihrc+dKFbqr2vFBOWkcmBt6xuC7mzbIMzn+dQwODAh1MS 9wtfDYkUw1Kzp+ne0VbegP0xYL6Jwig94lJHDQ3yv6eV5P4cZx0jRb2eEY+rcMgy 6FOL3jn7LdOkLY/L8wPKxXFhB5WILTOhZhxEdI40on5qF8c41ouFvenwnVxJE3zp WAvaPw+1KvM8GzXvxpgLsjYtOkDVpafNfbv7xwQxqZ/l29qLb8BBsTEgC67qPO5/ grIwWJgr38sW2UrfH/woEJ1hoa6tV9c5BbG6rTKO1uFIiIsJc2ixb38ipyuNEcmy y6UR60zqTpK96Bymw7Av+hQwjvxEpP6BI4hJ1HhW34nqU1mY0iVPOD8kKY3Azuvi oDVrg6pKyKuGAO2+e6YVOQYAtn1nq+CO+tAwpC2cz+JpEb3pS2thwNRMYyFk8x2n rIjeOVgPgTfrZt5SYiDiR2hYA216ugr0g4YISpdBqc5z1arFAx6S6jRYWYOCKlMP zA/KB7Il4k9WW2q8qD5COBBac6Hvkyl4ps9AWxWzCecUCQkDF+M= =KRyb -----END PGP SIGNATURE-----