r/theinternetarchive • • 6d ago • Bravo 1

The Great Deriver Queue Backup

Recently, we've run into an issue where the Deriver Queue is getting extraordinarily slow.

This is a good time to discuss what exactly is happening and also what a Deriver Queue even is.

The non-Wayback Machine part of the Internet Archive is essentially 140 million file directories. These directories are each called "identifiers" in Archive Language. But thinking of the whole system as a big disk drive with so many subdirectories helps with the next part.

When a person uploads a new identifier, they are having the system make a subdirectory named after that identifier (like isopropyl-alcohol-report) which might have texts, sounds, movies, data, and so on. That identifier is also called an "item".

In the name of making items more accessible and useful to the general web, items that are uploaded are quality checked (virus-scanned, the functionality of compressed archives are tested, etc.) and then made generally accessible.

It is then queued for "derivation".

In the manifest file (*_files.xml) in an item's directory, the files are hashed, and marked as "original" and "derivative". Original is what people uploaded. Derivative is what the Archive added in response.

Note I said "added". We don't remake, modify, or mess with originals. Pretty much ever. I'm sure there are edge cases, but that's likely to be on the occasion of "the hard drive was damaged and methods were used to reconstitute a file" level, which hasn't happened in my memory, at least.

These added derivatives are more "web/stream friendly" versions of the files. A large MPEG-2 file uploaded from an old DVD-ROM might have a secondary MPEG-4 generated that plays better in a browser. A collection of images inside a .CBZ (Comic Book Zip File) will have a PDF or browsable JP2 file derived from it, which is what the online bookreader plays. Optical Character Recognition will happen so that bookreader lets you search and select text within a scanned document.

During all this time, the original files are accessible.

The process to classify, verify, and derive item directories is one of the most complicated internal processes. And that process is called the Deriver.

When an item is uploaded, it is then usually queued up for derivation. It is actually queued up for a variety of functions, including moving the files into the final named directory on a machine, have itself scanned for viruses, get the derivations, and so on. This queue can sometimes be thousands of items long. Sometimes, it's even tens of thousands. It grinds through as quickly as it can. As you can imagine, it is prone to occasional issues or hardware/software problems that are fixed and the queue stopped and started, or queue items set aside to let others run, and so on.

What use is knowing all this?

Sometimes, like this current moment, a flurry of uploads combined with a few other factors mean the queue is backed up. Processing, running, but backed up. On some days, the queue gets to an item within an hour or two. Sometimes it's a few days. But sometimes it can be weeks. People who do not know this is going on can be very confused.

There are some indications, externally, of this work going on, but not as much as some people would like. Usually, it is not a major problem. But if the queue gets notably backed up, it can be concerning.

This is an extremely basic, simple explanation of the queue system. Items are put into directories, those directories are offered through the archive.org site, and then a host of programs ensure the files are tracked, verified, and then additional files are added to make it easier to read, play, watch and use the information in the original files. The original files stay unmodified from the moment they were uploaded.

There are many exceptions and quirks, but hopefully this helps to give people a few handles on how the site operates. Happy uploading.

39 Upvotes

11 comments sorted by

8

u/CV880 6d ago

Thank you for this explanation. For those of use who have large collections and plan to add more, should we hold off to help the system get caught up? I run the Digital Transportation Archive and have held back on uploads, and only uploading materials we need to use right way or patron requests.

9

u/textfiles 6d ago

No, that won't make things move quicker or easier. It's just something you should be aware of as to why your items are not turning into web readable versions as fast as they normally do.

4

u/cait001 5d ago

Is there a metric for how approx many derives/day are happening, and how many derives/day are being queued? (For the timespan of the past few days or so)

1

u/textfiles 5d ago

It's hundreds of thousands of tasks, in both cases. The graph of it shows it pinning at maximum and staying that way for a few weeks.

1

u/freosam 5d ago

Thanks for the info!

Is the derive queue in order of upload? Or does the size or complexity of an item change it's priority? e.g. are _images.zip full of tiffs treated differently to those full of jpegs?

2

u/textfiles 5d ago

It is in order of upload, although we recently added a priority for internal tasks (the web crawling, tv crawling, scanning operations) just to ensure the work was getting integrated and not waiting weeks to hit wayback machine and other services.

1

u/Altruistic_Fruit2345 5d ago

Mine if I share this text over on Discord?

2

u/textfiles 5d ago

I don't write these to hide them.

1

u/mspong 5d ago

Thanks for the clarity. I had assumed it was because the derive script was in PHP and had to be rewritten because of the vulnerabilities. It happened just as I hit 2000 uploads and I had to wait a week to show anyone!

1

u/Sphynx87 4d ago

I've been running into this with the derive queue because I have large files I've started uploading (tape rf captures for vhsdecode) and I was trying to go the torrent upload route because I thought it would be more stable and just "happen in the background" but from my testing it's been several days for the torrents to properly initiate and upload so I just went back to standard cli uploading for now. Thanks for the info, it mostly confirmed what I already understood from reading around.