lazy stat (was: reduce the number of fstat call to help server on SAN and network file servers)
|Reported by:||sam@…||Owned by:||moo|
Adding a parameter to indicate a modification time check delay for php opcode cache can help reduce the load for php server with root directory on a SAN or any network file system. The fstat cost with such setup is much higher than on local filesystem.
This can be implemented this way:
Adding a struct member with the last m_time check in the cache entry.
Check this entry and compare it with the request time, if the last check is within the specified delay (10 seconds for example), use the cache entry as is.
If the last check time is older, read the m_time, update the last check time and do the timestamp compare as now.
Change History (6)
comment:5 Changed 5 years ago by moo
- Summary changed from reduce the number of fstat call to help server on SAN and network file servers to lazy stat (was: reduce the number of fstat call to help server on SAN and network file servers)