-
-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automate updating versions.list file #1400
Comments
I would like to instrument the size of the calculated versions, so that we can see it change over time. If we did not have this problem, I would recommend updating the versions.list only once every 6-24 months, because any time we change it every user has to download the entire ~10MB file again from scratch. On a slow connection, that takes a very long time. :/ |
Here is an estimate of value(data to append) bytesize using datadump of 2016-08-22
Read of value size 794487 bytes without compression takes 73.77823800015904 milliseconds (less than half of the time spent in read of compressed value of comparable size). time = Benchmark.realtime do
versions_after_date = Rails.cache.read('versions')
end
puts "#{time*1000} milliseconds" Looks like without compression we will need to update (or create a new chunk) versions.list in less than a month and with compression we will get little over 3 months. |
|
In the code snippet you can see txp has
unlike "fixing" dependency record from unresolved_name to real rubygem_id from a hook, we can't "fix" the version info_checksum using similar process. versions.list file is append-only and changing info_checksum from the middle of file would mean etag/checksum mismatch between client cache and server response. client will have to download the entire file, whenever someone pushes a version which has this issue if we do "fix" the info_checksum after the fact. We are hoping to resolve the above-mentioned issue with automation of versions.list file update |
http://rubygems.org/versions file is meant to updated every month. As versions.list file gets older, it gets more and more expensive to calculate the versions we need to append to the file.
We cache the calculated versions. Memcached has limit on value size of 1MB. We compress the
value
before it gets stored in memcached ifvalue
size is greater than 500KB. However, it is preferable that we never reach the state where we need to compress the data as later we have to price for decompression on cache hit.The text was updated successfully, but these errors were encountered: