Skip to content

JIT: Hibernate JIT to disk for use with pre-built containers #16484

Closed as not planned
@iamacarpet

Description

@iamacarpet

Description

Idea:

Support hibernating the JIT cache to disk.

Why?:

When building containers that contain both the PHP runtime and application code (that isn’t going to change once built into the container), a lot of CPU cycles are wasted re-warming the opcache/JIT every time a version of the container starts, even though the code will always remain the same.

In a large distributed container based platform like Lambda, App Runner, App Engine or Cloud Run, there are significant performance gains & cost savings to be realised by being able to pre-warm the JIT at container build time, then load it from disk at container startup.

How?:

Would it be possible to dump the JIT/opcache memory to disk?

While also having the option to load that dump at startup?

It could be controlled via ini options, which could be set on the PHP CLI as arguments when dumping the memory at build time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions