Page MenuHomePhabricator

action=purge on large video files is slow (~900mb -> ~40s)
Open, Needs TriagePublic

Description

When running action=purge on File: pages of huge uploaded video files, such as https://commons.wikimedia.org/wiki/File:Tears_of_Steel_in_4k_-_Official_Blender_Foundation_release.webm (914MB source file) can be very slow; under good network & load conditions I timed that one running for around 40 seconds.

If I understand what's going on, a purge on a File: page causes the image metadata to be invalidated and then re-read from the source file... which means a full copy of 914 megabytes from swift to the local filesystem before the Handler can peek at what's probably only a few bits of the file.

Might want to think about whether this needs to be fully synchronous on the action=purge POST, or would be ok to run through a background job. Or, we could think about out how to provide access to just the data required (filesystem mapping? HTTP with range requests?)

Event Timeline

Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript

@jcrespo, scalers shouldn't be directly affected here. Purges run on the app servers afaik.

Currently the videoscalers are relatively healty, though there is clearly something wrong with how jobs are scheduled: while we should have just 5 concurrent jobs running at any time, we have currently as many as 10 jobs spawned by HHVM on the scalers.

This seems to hint some discrepancy between the scheduling and the actual execution of jobs.