php 提速工具eAccelerator 配置參數(shù)詳解
Jun 13, 2016 pm 12:16 PM
eaccelerator.shm_size="32"
eAccelerator 可以使用的共享內(nèi)存的數(shù)量 (以兆為單位) . "0" 是指操作系統(tǒng)的默認(rèn)值. 默認(rèn)值是 "0".可根據(jù)服務(wù)器的實(shí)際情況來調(diào)整,16,32,64,128都是可以的。
eaccelerator.cache_dir="/home/php/tmp"
這個(gè)目錄是給磁盤緩存使用. eAccelerator 在這里儲存預(yù)先編譯好的代碼, 進(jìn)程數(shù)據(jù), 內(nèi)容以及用戶的自定義內(nèi)容. 同樣的數(shù)據(jù)也能被儲存在共享內(nèi)存中 (這樣可以提高訪問速度). 默認(rèn)的設(shè)置是 "/tmp/eaccelerator".
eaccelerator.enable="1"
開啟或關(guān)閉 eAccelerator。"1" 為開啟,"0" 為關(guān)閉。默認(rèn)值為 "1"。
eaccelerator.optimizer="1"
啟或關(guān)閉內(nèi)部優(yōu)化器,可以提升代碼執(zhí)行速度。"1" 為開啟,"0" 為關(guān)閉。默認(rèn)值為 "1"。
eaccelerator.check_mtime="1"
打開或者關(guān)閉 PHP 的文件修改檢查. "1" 是指打開, "0" 是指關(guān)閉. 如果您在修改以后重新編譯 PHP 的文件,那么您應(yīng)當(dāng)設(shè)置為 "1". 默認(rèn)值是 "1".
eaccelerator.debug="0"
開啟或關(guān)閉調(diào)試日志記錄。"1" 為開啟,"0" 為關(guān)閉。默認(rèn)值為 "0"。會將緩存命中得記錄寫入日志。
eaccelerator.filter=""
判斷哪些 PHP 文件必須緩存。您可以指定緩存和不緩存的文件類型(如 "*.php *.phtml"等)
如果參數(shù)以 "!" 開頭,則匹配這些參數(shù)的文件被忽略緩存。默認(rèn)值為 "",即,所有 PHP 文件都將被緩存。
eaccelerator.shm_max="0"
當(dāng)使用 " eaccelerator_put() " 函數(shù)時(shí)禁止其向共享內(nèi)存中存儲過大的文件。該參數(shù)指定允許存儲的最大值,單位:字節(jié) (10240, 10K, 1M)。"0" 為不限制。默認(rèn)值為 "0"。
eaccelerator.shm_ttl="0"
當(dāng) eAccelerator 獲取新腳本的共享內(nèi)存大小失敗時(shí),它將從共享內(nèi)存中刪除所有在最后 "shm_ttl" 秒內(nèi)沒有存取的腳本緩存。默認(rèn)值為 "0",即:不從共享內(nèi)春中刪除任何緩存文件。
eaccelerator.shm_prune_period="0"
當(dāng) eAccelerator 獲取新腳本的共享內(nèi)存大小失敗時(shí),他將試圖從共享內(nèi)存中刪除早于"shm_prune_period" 秒的緩存腳本。默認(rèn)值為 "0",即:不從共享內(nèi)春中刪除任何緩存文件。
eaccelerator.shm_only="0"
允許或禁止將已編譯腳本緩存在磁盤上。該選項(xiàng)對 session 數(shù)據(jù)和內(nèi)容緩存無效。默認(rèn)值為 "0",即:使用磁盤和共享內(nèi)存進(jìn)行緩存。
eaccelerator.compress="1"
允許或禁止壓縮內(nèi)容緩存。默認(rèn)值為 "1",即:允許壓縮。
eaccelerator.compress_level="9"
指定內(nèi)容緩存的壓縮等級。默認(rèn)值為 "9",為最高等級。
eaccelerator.keys = "disk_only"
eaccelerator.session = "disk_only"
eaccelerator.content = "disk_only"
設(shè)置內(nèi)容緩存的存放的地方,可以設(shè)置為:
shm_and_disk 在共享緩存和硬盤(默認(rèn)值)
shm 默認(rèn)存在共享內(nèi)存,如果共享內(nèi)存已滿或大小超過 "eaccelerator.shm_max" 的值,就存到硬盤
shm_only 只存放在共享內(nèi)存
disk_only 只存放在硬盤
none 不緩存數(shù)據(jù)
eaccelerator.allowed_admin_path = "/var/www/html/21andy.com/eaccelerator"
這是控制面板的地址
安裝包里有個(gè)control.php,你把它復(fù)制到網(wǎng)站的任意目錄,可以用它查看和管理,這個(gè)必須指定,否則查看緩存內(nèi)容的時(shí)候會出錯
最后,來看一下我的 eAccelerator 設(shè)置
復(fù)制代碼 代碼如下:
; eaccelerator
[eaccelerator]
zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
eaccelerator.shm_size="128"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="3600"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.keys = "disk_only"
eaccelerator.sessions = "disk_only"
eaccelerator.content = "disk_only"
eaccelerator.allowed_admin_path = "/var/www/html/21andy.com/eaccelerator"
另外,再說下 eAccelerator 的安裝
# wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
# tar -jxvf eaccelerator-0.9.6.tar.bz2
# cd eaccelerator-0.9.6
# /usr/local/php/bin/phpize
# ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
# make && make install

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

USDT is not suitable as a traditional value-added asset investment, but can be used as an instrumental asset to participate in financial management. 1. The USDT price is anchored to the US dollar and does not have room for appreciation. It is mainly suitable for trading, payment and risk aversion; 2. Suitable for risk aversion investors, arbitrage traders and investors waiting for entry opportunities; 3. Stable returns can be obtained through DeFi pledge, CeFi currency deposit, liquidity provision, etc.; 4. Be wary of centralized risks, regulatory changes and counterfeit currency risks; 5. In summary, USDT is a good risk aversion and transitional asset. If you pursue stable returns, it should be combined with its use in financial management scenarios, rather than expecting its own appreciation.

USDC is safe. It is jointly issued by Circle and Coinbase. It is regulated by the US FinCEN. Its reserve assets are US dollar cash and US bonds. It is regularly audited independently, with high transparency. 1. USDC has strong compliance and is strictly regulated by the United States; 2. The reserve asset structure is clear, supported by cash and Treasury bonds; 3. The audit frequency is high and transparent; 4. It is widely accepted by institutions in many countries and is suitable for scenarios such as DeFi and compliant payments. In comparison, USDT is issued by Tether, with an offshore registration location, insufficient early disclosure, and reserves with low liquidity assets such as commercial paper. Although the circulation volume is large, the regulatory recognition is slightly low, and it is suitable for users who pay attention to liquidity. Both have their own advantages, and the choice should be determined based on the purpose and preferences of use.

The ways to obtain USDT include: 1. Purchase through centralized exchanges such as Binance, OKX, etc., which is convenient to operate and supports multiple payment methods; 2. OTC modules are included in the platform for over-the-counter transactions, suitable for large-scale and privacy-conscious users; 3. Use stablecoin exchange platforms or wallets (such as TokenPocket) and decentralized exchanges (such as Uniswap) to achieve cross-chain or cross-currency exchanges; 4. Participate in exchange activities or task platforms to obtain airdrop rewards; 5. Obtain USDT incentives through mining, content creation, community interaction, etc.; 6. Collect USDT directly from other people's wallets, and pay attention to chain type matching to avoid asset loss.

PYUSD is not suitable as a speculative asset, but is suitable for payment and funding stability. 1.PYUSD is issued by PayPal, anchored to the US dollar, and has no appreciation potential; 2. It is suitable for short-term value preservation and avoiding crypto market fluctuations; 3. Currently supports Coinbase, Kraken, Binance US, Huobi and PayPal wallet transactions; 4. Compliance and security should be given priority when choosing a platform.

To check the real-time price of altcoins, it is recommended to use the exchange market page, market aggregation website and professional market APP. Specific methods include: 1. View real-time prices and trends through mainstream exchanges (such as Binance, OKX, Huobi); 2. Use market aggregation websites (such as CoinMarketCap, CoinGecko) to obtain authoritative and comprehensive data; 3. Use professional APP for personalized monitoring and chart analysis. It is recommended to combine multi-platform data, use chart tools to analyze trends, set price reminders, and give priority to highly-known platforms to ensure accurate and timely data.

Security and personal needs should be given priority when choosing a Bitcoin trading platform. 1. Binance is a world-leading platform, providing rich trading pairs and low fees; 2. OKX has strong technical strength and supports multiple trading modes; 3. Gate.io currency selection is numerous and the community is active; 4. Huobi interface is simple and easy to use; 5. KuCoin focuses on user experience; 6. Kraken is highly compliant; 7. BITFINEX is suitable for professional traders; 8. Bitstamp is simple to operate. Each platform has its own advantages, and users need to choose according to their own situation.

The altcoin transfer fee varies from chain to chain and is mainly determined by the basic network fee, transaction speed and Gas unit. 1. The Ethereum fee is high, with an average of US$2~20 per transaction, suitable for high-value transactions; 2. The Binance Smart Chain fee is low, about US$0.1~0.3, suitable for daily operations; 3. The Solana fee is extremely low, usually below US$0.0001, suitable for high-frequency transactions; 4. The Polygon fee is less than US$0.01, compatible with EVM; 5. TRON focuses on low-cost, and the handling fee is almost negligible. Users should reasonably choose the transfer method based on the characteristics of the chain, network congestion and gas fluctuations, and at the same time confirm that the token belongs to the same link as the receiver to avoid asset losses.

Binance, OKX, Huobi and Gate.io are the main platforms for altcoin trading, each with its advantages and disadvantages. 1. In terms of security, Binance has SAFU insurance fund, OKX has a hot and cold wallet separation and whitelist mechanism, Huobi uses multi-signature storage, and Gate.io runs stably; 2. In terms of handling fees, Binance is 0.1%, OKX is as low as 0.02%, Huobi is 0.2%, but it is deductible, Gate.io is 0.2%; 3. The number of currencies, Gate.io has more than 1,400 types, Binance has more than 400 types, OKX has new fast, and about 300 types; 4. User experience, Binance has diverse interfaces, OKX has rich strategy tools, Huobi is suitable for Asian users, Gate.io supports voting for innovative projects; 5. Coin withdrawal speed, Binance is the most
