This article mainly introduces the configuration information of Asf PHP development resident in the system memory. It has a certain reference value. Now I share it with you. Friends in need can refer to it.
The configuration file will be reloaded with each request. Even if the configuration file content has not been updated, it will be reloaded. This is a very bad design. (When Opcache is turned on, there is still execution time)
The content of the read configuration file is saved to the system memory, and the next request goes directly to the memory to read the data. Asf also provides a very simple configuration implementation Config Cache.
It is recommended to enable it in web application scenarios. Later versions may enable it by default
It also takes effect when enabled in CLI and multi-threaded mode, but the PHP script is released every time it is executed.
Copy after login
run();
Copy after login
Copy after login
getConfig()->toArray()); print_r(Asf\Config::get()->toArray());
Total transferred: 16109994 bytes HTML transferred: 14259994 bytes Requests per second: 6859.01 [#/sec] (mean) Time per request: 14.579 [ms] (mean) Time per request: 0.146 [ms] (mean, across all concurrent requests)
Total transferred: 16080000 bytes HTML transferred: 14230000 bytes Requests per second: 6398.22 [#/sec] (mean) Time per request: 15.629 [ms] (mean) Time per request: 0.156 [ms] (mean, across all concurrent requests)
Nginx load scheduler dual Tomcat load and session sharing MySQL back-end database
ThinkPHP5.0 Linux Apache/ Nginx rewrite URL configuration
The above is the detailed content of Asf PHP development configuration information is resident in system memory. For more information, please follow other related articles on the PHP Chinese website!