EAccelerator is a free and open source php accelerator. It optimizes and dynamically caches content, improves the cache performance of php scripts, and completely eliminates the server overhead when PHP scripts are compiled. It also optimizes scripts to accelerate execution efficiency. Improve your PHP code execution efficiency by 1-10 times
1. what is eAccelerator? What is the purpose?
EAccelerator is a free and open source php accelerator. It optimizes and dynamically caches content, improves the cache performance of php scripts, and completely eliminates the server overhead when PHP scripts are compiled. It also optimizes scripts to accelerate execution efficiency. Improve the code execution efficiency of your PHP program by 1-10 times;
II,EAccelerator installation and configuration
For more information about the installation method, see
Http://blog.51yip.com/php/177.html
Vi/usr/local/php/lib/php. ini
Zend_extension = "eaccelerator. so"
[Eaccelerator]
Eaccelerator. shm_size = "32" note: Shared memory size;
Eaccelerator. cache_dir = "/var/ecache" note: cache directory;
Eaccelerator. enable = "1"
Eaccelerator. optimizer = "1"
Eaccelerator. check_mtime = "1"
Eaccelerator. debug = "0"
Eaccelerator. filter = ""
Eaccelerator. shm_max = "0"
Eaccelerator. shm_ttl = "0"
Eaccelerator. shm_prune_period = "0"
Eaccelerator. shm_only = "0"
Eaccelerator. compress = "1"
Eaccelerator. compress_level = "9"
After configuration, restart apache or other services. go to phpinfo () and check the configuration.
EAccelerator
EAccelerator support |
Enabled |
Version |
0.9.5.3 |
Caching Enabled |
True |
Optimizer Enabled |
True |
Memory Size |
33,554,396 Bytes |
Memory Available |
17,141,280 Bytes |
Memory Allocated |
16,413,116 Bytes |
Cached Scripts |
216 |
Removed Scripts |
0 |
Cached Keys |
0 |
Installed successfully. Just click two php files and check the results. I don't think it is as fast as possible. Haha.
Eaccelerator. cache_dir = "/var/ecache" note: cache directory;
Go to the directory and check what is in it.
A hexadecimal folder is generated.
III. Comparison of eAccelerator
1), test the php file
View copy print?
-
- $ Con = mysql_connect ("localhost", "dbadmin ","********");
- If (! $ Con)
- {
- Die ('could not connect: '. mysql_error ());
- }
- Mysql_select_db ("test", $ con );
- Mysql_query ('set names utf8 ');
- $ Result = mysql_query ("SELECT * FROM test3 ");
- While ($ row = mysql_fetch_array ($ result ))
- {
- Echo $ row ['A3 ']. "+". $ row ['AAA'];
- Echo" ";
- }
- Mysql_close ($ con );
- ?>
";}mysql_close($con);?>
2), there areResults of the eAccelerator module
3 ),NoneResults of the eAccelerator module
I personally think there is not much difference. this is just a test, because the file is easy to write and there is little data in the data table, which may be the reason for no difference. But it is difficult to see how many times it will be.