Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Add info about optimized realpath_cache_settings #7939

Merged
merged 19 commits into from
Sep 29, 2020

Conversation

meker12
Copy link
Contributor

@meker12 meker12 commented Sep 25, 2020

Purpose of this pull request

  • Add information from Magento Performance team about configuring the following recommended settings for PHP realpath_cache settings:

    • realpath_cache_size=1M
    • realpath_cache_ttl=7200
  • Improve readability of PHP plugin listing in the PHP configuration section of the .magento.app.yaml, and add link to "Customize PHP.INI" topic.

Affected DevDocs pages

@meker12 meker12 added this to the meker12 milestone Sep 25, 2020
Copy link
Contributor

@BarnyShergold BarnyShergold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 3 small Linting errors

src/cloud/project/magento-app-php-application.md Outdated Show resolved Hide resolved
src/cloud/project/magento-app-php-application.md Outdated Show resolved Hide resolved
- `zip`
- **Default extensions** are the default extensions available with the PHP application.
- **Required extensions** are installed automatically and cannot be removed
- **Optional extensions**–You can install and remove these extensions as needed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Optional extensions**–You can install and remove these extensions as needed
- **Optional extensions**–You can install and remove these extensions as needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed these updates and reverted to original headings from the nested list.

- `yaml`
- `zip`
- `pcntl`
| Default extensions | Required extensions | Optional extensions |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required Extension list has been repeated in the Default Extensions list
Also as the Optional list is much longer that the other, the DE & RE list float in the middle of the table. Can these be aligned to the top?

Copy link
Contributor Author

@meker12 meker12 Sep 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-Redid the table to begin with required extensions, followed by default and optional extensions. I also removed the default extensions from the optional list, and updated the Optional descriptions summary to state that the default extensions can be disabled.-

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid the list is still incorrect.
The following extensions are required but appear in the optional list -
bcmath
gd
intl
pdo_mysql
soap
xsl
zip

(https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sockets extension also became required in Magento 2.4.0 and higher btw. Should also be included in https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html in my opinion!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hostep I updated the PHP settings topic to add a note about the ext-sockets extension that was in the 2.3 version of the topic:

If you install Magento via cloning from the [GitHub](https://github.com/magento/magento2) repository, then make sure you have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your instance.

In the php-settings topic, the list of required extensions is generated in this file: https://github.com/magento/devdocs/blob/master/src/_includes/install/php-extensions-template.md, but ext-sockets is not included. I think we should open a separate issue to address this, and request assistance from @dshevtsov.

Copy link
Contributor Author

@meker12 meker12 Sep 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid the list is still incorrect.
The following extensions are required but appear in the optional list -
bcmath
gd
intl
pdo_mysql
soap
xsl
zip

(https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html)

I restored the original content from this topic. I realized that I was conflating enable and disable extensions with install and uninstall. In the .magento.app.yaml file, which is the subject of this topic, you only enable and disable extensions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@meker12: we already kind-of had an issue for this, but it was closed unfortunately: #7568 (comment), should I create a new issue for this? I know colleagues of yours are already aware of the issue for many months (internal ticket DOC-80), but maybe we need an official public ticket to track this, otherwise it might be forgotten...

Copy link
Contributor Author

@meker12 meker12 Sep 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hostep Thanks for the context about the ext-sockets extension. It's useful that the current guide now includes a specific mention of the ext-sockets extension, and why you need it. Will follow up on our internal ticket to understand the best information to provide about this extension.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hostep the DOC-80 is closed. It was mostly focused on the Packages topics. As it appeared, it's impossible to get accurate information about PHP versions from the Composer files. I hope that it is still possible for the list of extensions. Please open an issue for this with your recent suggestions (#7568, #7398) and assign it to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dshevtsov, done: #7960 (but I can't assign you)

- `yaml`
- `zip`
- `pcntl`
| Default extensions | Required extensions | Optional extensions |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid the list is still incorrect.
The following extensions are required but appear in the optional list -
bcmath
gd
intl
pdo_mysql
soap
xsl
zip

(https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html)

@@ -73,14 +73,23 @@ PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- Installing and updating Magento components from Magento Marketplace, `2G`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably be removed now that the web set up wizard was removed in Magento 2.4.0?

- `zip`
- **Required extensions** install automatically and cannot be removed.
- **Default extensions** install by automatically. You can disable them as needed.
- **Optional extensions**–You can add or disable these extensions as needed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line uses an emdash and the others don't. Maybe can match with something like:

Suggested change
- **Optional extensions**–You can add or disable these extensions as needed.
- **Optional extensions** are not installed. You can install these extensions as needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed these headings

src/cloud/project/magento-app-php-application.md Outdated Show resolved Hide resolved
- `sysvshm`
- `opcache`
- `zip`
- **Required extensions** install automatically and cannot be removed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, after thinking about the following two list items, you say "add or disable" a couple of times, which seems a little weird. Add = install? And enable = ?add?. Would it be correct to say the required extensions "install and enable" automatically?

Also, you say you cannot remove it, but can you disable it?

Copy link
Contributor Author

@meker12 meker12 Sep 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's confusing because the runtime section has two sections: extensions: and disabled:extensions

    extensions:
        - sockets
        - sodium
        - ssh2
    disabled_extensions:
        - bcmath
        - bz2
        - calendar
        - exif

and the headings in the original topic for each section were:

  • default extensions
  • Extensions that are installed and cannot be uninstalled
  • Extensions that can be installed and uninstalled as needed

It's not clear to me what is meant by install and uninstalled -- and how that relates to the runtime section.

I think the confusion is that with extensions, you can install them, and you can enable or disable them after they are installed.

Andrii also pointed out to me the default .magento.app.yaml in magento-cloud template:

# Enable extensions required by Magento 2
runtime:
    extensions:
        - xsl
        - json
        - newrelic
        - sodium

src/cloud/project/magento-app-php-ini.md Outdated Show resolved Hide resolved
```bash
To increase the PHP memory limit, add the following setting to the php.ini file:

```php
memory_limit = 756M
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our support site is recommending something different. Is 756 the minimum? I know I have seen different values for this, and mine is set to 2G.
https://support.magento.com/hc/en-us/articles/360034599631-PHP-settings-errors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no recommended minimum, this has been discussed many times before, 768M and 2G are ridiculously high. We are running M2 shops on 192M or 256M without issues.

- `pcntl`
| Default extensions | Required extensions | Optional extensions |
|--------------------|---------------------|---------------------|
| `ctype`<br> `curl`<br> `date`<br> `dom`<br> `fileinfo`<br> `filter`<br> `ftp`<br> `hash`<br> `iconv`<br> `json`<br> `mbstring`<br> `mysqlnd`<br> `openssl`<br> `pcre`<br> `pdo`<br> `pdo_sqlite`<br> `phar`<br> `posix`<br> `readline`<br> `session`<br> `sqlite3`<br> `tokenizer`<br> `xml`<br> `xmlreader`<br> `xmlwriter`<br> | `ctype`<br> `curl`<br> `date`<br> `dom`<br> `fileinfo`<br> `filter`<br> `ftp`<br> `hash`<br> `iconv`<br> `json`<br> `mbstring`<br> `mysqlnd`<br> `openssl`<br> `pcre`<br> `pdo`<br> `pdo_sqlite`<br> `phar`<br> `posix`<br> `readline`<br> `session`<br> `sqlite3`<br> `tokenizer`<br> `xml`<br> `xmlreader`<br> `xmlwriter`<br> | `bcmath`<br> `bz2`<br> `calendar`<br> `exif`<br> `gd`<br> `geoip`<br> `gettext`<br> `gmp`<br> `igbinary`<br> `imagick`<br> `imap`<br> `intl`<br> `ioncube`<br> `ldap`<br> `mailparse`<br> `mcrypt`<br> `msgpack`<br> `mysqli`<br> `oauth`<br> `opcache`<br> `pdo_mysql`<br> `propro`<br> `pspell`<br> `raphf`<br> `recode`<br> `redis`<br> `shmop`<br> `soap`<br> `sockets`<br> `sodium`<br> `ssh2`<br> `sysvmsg`<br> `sysvsem`<br> `sysvshm`<br> `tidy`<br> `xdebug`<br> `xmlrpc`<br> `xsl`<br> `yaml`<br> `zip`<br> `pcntl`<br> |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is best to clarify here. I don't know why any extension from the Required column would be duplicated anywhere else because you note that they cannot be removed.

Copy link
Contributor Author

@meker12 meker12 Sep 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored original column headings. My proposed updates didn't make sense.

maeker12 and others added 4 commits September 28, 2020 12:19
…b.com:magento/devdocs into mae-mcloud-6865-update-php-customization-info
- Correct recommended memory limit and realpath_cache values
- Corrected table with supported PHP extensions per review feedback
Co-authored-by: Barny Shergold <[email protected]>
@meker12 meker12 added the Technical Updates to the code or processes that alter the technical content of the doc label Sep 29, 2020
Copy link
Contributor

@BarnyShergold BarnyShergold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Copy link
Contributor

@hguthrie hguthrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much more clear. Yay!

@@ -41,18 +41,25 @@ Magento requires a set of extensions to be installed:
<!--{% assign packages = site.data.codebase.v2_4.open-source.composer_lock.packages %}-->
{% include install/php-extensions-template.md %}

In the command line, type:
{:.bs-callout-warning}
If you install Magento by cloning the [magento/magento2](https://github.com/magento/magento2) GitHub repository, you must have the [ext-sockets](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md#281---2018-11-13) extension installed on your system.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect information for Magento 2.4.0. It's correct for Magento 2.3.x, but not for 2.4.x. The sockets plugin is always needed for all installation scenario's, not only when you clone Magento's repository.

Copy link
Contributor

@hostep hostep Sep 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to revert #7398, which is not correct.

@meker12
Copy link
Contributor Author

meker12 commented Sep 29, 2020

running tests

@meker12 meker12 merged commit f05a450 into master Sep 29, 2020
@ghost
Copy link

ghost commented Sep 29, 2020

Hi @meker12, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@meker12 meker12 deleted the mae-mcloud-6865-update-php-customization-info branch September 29, 2020 22:28
@dshevtsov dshevtsov removed their assignment Sep 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2.x Technical Updates to the code or processes that alter the technical content of the doc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants