TAILIEUCHUNG - Pro PHP Application Performance Tuning PHP Web Projects for Maximum Performance phần 5

Sử dụng mã được hiển thị trong Ví dụ 3-13, chúng tôi theo dõi quá trình cùng một điểm chuẩn các vòng lặp bằng cách khởi động lại máy chủ web của chúng tôi, thực hiện mã mười lần, và lấy kết quả trung bình. Ví dụ 3-13. Sử dụng một vòng trong bảng liệt kê | CHAPTER 4 OPCODE CACHING The benefits of using APC should be clear. Instead of satisfying requests per second with no Opcode caching our web server can now satisfy requests per second with Opcode caching. The web server response time has also decreased. With the initial figure using the default APC settings we increased performance by a fraction. To determine if we can do better in speed we need to look into the APC settings in depth and determine what default APC settings can be turned off or on to boost performance. APC Settings APC provides developers settings that can be used to control APC from within the file. We encountered a few of these settings while setting up APC as shown in Listing 4-1 and Listing 4-4. In each of the listings we set the and settings. The setting allows us to turn off or on APC by using an integer value of 0 or 1. By default the setting is set to 1. on the other hand allows APC to check for any modifications of the PHP script which has been cached each time the script is requested regardless of whether it s an initial request or subsequent request. This of course is an overhead on the caching life cycle of the Opcode and in most cases it s a safe bet to turn off. Keep in mind that turning this setting off will force you to restart your web server each time you make a change to a PHP script that is cached. Additional settings are shown in Table 4-1 which contains the most widely used settings as well as their description. The complete list of settings can be found at apc. Table 4-1. Widely Used APC Settings Setting Name Description Turns on caching by default. A value of 1 is used for on state. A value of 0 is used for off state. Files to cache or not cache based on a comma-separated POSIX regular expression. A regular expression containing a at the beginning will force APC to not cache any file matching the regular .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.