-
Notifications
You must be signed in to change notification settings - Fork 166
[XrdHttp] Set oss.asize if object size is known #2378
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
Conversation
bf0b7bc to
d54785d
Compare
662bf8d to
c5a25dc
Compare
|
Per input from @amadio in a different ticket, I re-targeted this to master. |
|
@ccaffy - since you've been working on the XrdHttp pieces, would you be able to review this? |
ccaffy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Brian, I tried it on my local box, it works without any problem. Just one minor thing to change if possible :)
e13461e to
7241378
Compare
ccaffy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great, thanks for the addition of the system tests!
If the client declares the expected size of the uploaded object, then pass this information on to the OSS layer via the `oss.asize` CGI. This is relevant for the S3 backend as the S3 protocol requires object sizes to be declared ahead of time. If XRootD doesn't provide this information, then the S3 OSS backend has to buffer the uploaded object to know the final size, costing both in overall throughput and memory usage.
This adds a test where `curl` is invoked in such a way that the final object length is known at open time. This is passed through to the xrootd bridge layer and allows the OSS to allocate itself appropriately. The test itself looks through the server log not for the oss.asize string (which is not logged) but rather for the length of the request (which contains the URL) sent to the bridge. The first upload of a file does not include `oss.asize` so the size of the two log messages can be compared.
7241378 to
368047c
Compare
If the client declares the expected size of the uploaded object, then pass this information on to the OSS layer via the
oss.asizeCGI.This is relevant for the S3 backend as the S3 protocol requires object sizes to be declared ahead of time. If XRootD doesn't provide this information, then the S3 OSS backend has to buffer the uploaded object to know the final size, costing both in overall throughput and memory usage.