Opened 4 years ago

Last modified 15 months ago

#253 assigned enhancement

lazy stat (was: reduce the number of fstat call to help server on SAN and network file servers)

Reported by: sam@… Owned by: moo
Priority: major Milestone: 3.2.0
Component: cacher Version: 1.3.0
Keywords: Cc:
Application: PHP Version:
Other Exts: SAPI: Irrelevant
Probability: Sometimes Blocked By:
Blocking:

Description

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:1 Changed 4 years ago by moo

  • Status changed from new to assigned

sounds like a good idea. i'll consider it

comment:2 Changed 2 years ago by moo

  • Milestone changed from 1.3.3 to 2.1.0

comment:3 Changed 2 years ago by moo

  • Milestone changed from 2.2.0 to 2.0.0

let's see if it's reduced in 2.0.0
changes were already done in xcache svn trunk, but need testing

comment:4 Changed 2 years ago by moo

  • Milestone changed from 2.0.0 to 2.1.0

sorry, this ticket is misunderstood. this is a nice feature request to have it between xcache.stat=1 and xcache.stat=0

comment:5 Changed 2 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)

comment:6 Changed 15 months ago by moo

  • Milestone changed from 3.0.2 to 3.1.0
Note: See TracTickets for help on using tickets.