Optimal settings¶
cURL >= 7.16.2
While not required, we recommend installing a recent version of cURL compiled with OpenSSL/NSS and zlib. If cURL is not installed on your system and you do not configure a custom http_handler for your client, then the SDK will use the PHP stream wrapper (a very underpowered HTTP client).
OPCache
Using the OPcache extension improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request. This extension is typically enabled by default.
When running on Amazon Linux, you need to install the php56-opcache or php55-opcache yum package to utilize the OPCache extension.
Uninstall Xdebug
Xdebug is an amazing tool that can be used to identify performance bottlenecks. However, if performance is critical to your application, do not install the Xdebug extension on your production environment. Simply loading the extension will greatly slow down the SDK.
Use a Composer classmap autoloader
Autoloaders are used to lazily load classes as they are required by a PHP script. Composer will generate an autoloader that is able to autoload the PHP scripts of your application and all of the PHP scripts of the vendors required by your application (i.e. the AWS SDK for PHP). When running in production, it is highly recommended that you use a classmap autoloader to improve the autoloader's speed. You can generate a classmap autoloader by passing the -o or --optimize-autoloader option to Composer's install command.