Realpath cache size best practice
It is recommended that you set realpath cache size to 10 MB for Adobe Commerce on-premises 2.3.x and Adobe Commerce on cloud infrastructure 2.3.x users. Realpath cache caches the real file system paths of filenames referenced instead of looking them up each time. Every time various file functions are performed or require a file and use a relative path, PHP has to look up where that file really exists.
Affected products and versions
- Adobe Commerce on cloud infrastructure all versions 2.3.x and above
- Adobe Commerce on-premises all versions 2.3.x and above
If realpath cache size is too low or high, it adds additional overhead during cache generation. Increase
realpath_cache_size php setting in the
php.ini file. Adobe Commerce best practice states that the allocated memory for realpath cache needs to be 10 MB. Refer to Configure PHP Options in our developer documentation.
Refer to PHP settings in our developer documentation.
Best practices to improve Adobe Commerce on cloud infrastructure site performance in our support knowledge base: