-
Notifications
You must be signed in to change notification settings - Fork 246
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
Performance of running FLEDGE auctions #385
Comments
It’s worth noting that this matches the results from our Fledge tests, where more than 50% of auctions running for actual users eligible for Origin Trials are taking over 1s. We’ve been running Fledge auctions on real publishers’ pages (impressions bought via direct integration or classic RTB). Interest Groups were created in browsers visiting our partners’ pages through our production infrastructure. Measurements done:
In order to factor out the network latency impact, we’ve aggregated only auctions where contextual requests took over 150ms. Sample size:
|
Thank you @barteklos and @maciejkowalczyk for sharing this insightful information. I have also been investigating a lot of time and thought into different ways to improve the latency of FLEDGE auctions. I think the results of your two benchmarks are interesting and provide further motivation for the idea I started discussing at the end of last week’s WICG FLEDGE call: Today’s plan for FLEDGE auctions is to run the auction after the contextual request has completed. A large portion of FLEDGE’s auction latency (10-50% depending on device and network performance) is attributable to a number of things that do not depend on
The implication is that if I think we can modify the FLEDGE |
I think if we plan to change |
Would you expect perBuyerSignals to be a single promise or a map of promises? |
|
Our current assumption is that sellers/SSPs will construct an As we discussed in the WICG call, the list of eligible buyers (for a given SSP) is fairly stable and could be provided out-of-band in some way. The risk with this approach is that buyers will be initialized who don't ultimately want to participate - i.e. they are eligible, the browser does the init work for the IGs, but they don't signal interest in participating through the contextual auction. In this case the For what it's worth, here is a sequence diagram that shows the interaction of GAM, Prebid.js, FLEDGE, and Sellers: |
Thank you Joel. I think that the browser initializing buyers who end up not returning contextual signals is likely to be a worthwhile trade-off here. Of course the only extra work here would be for buyers who have actually stored IGs in this particular browser! And in the future we could consider prioritizing IGs by first setting up the ones that are most likely to bid based on historical data. The upshot is, I do think it is quite worthwhile to figure out how a prebid-integrated SSP could provide its list of buyers earlier, ideally as part of either step "2. loads & configures Prebid.js" or step "6. invokes bid adapters". |
Thanks. Does this mean that if one has component auctions, that the information for filling in things in their nested AuctionConfig is going to come in independently, or is it likely that the top-level seller will have to be involved somehow? Basically I am trying to figure out how much fine-grained tracking of when information comes in is worthwhile or if doing potentially simpler stuff would be just as good. |
@zhengweiwithoutthei FYI, DirectFromSellerSignals has some natural parallelism already due to using subresource bundles -- as soon as the When the worklet goes to fetch subresources in the bundle file, that load will block until the bundle has loaded, completing immediately if the bundle has already loaded. (Note that the bundle file doesn't need to have fully loaded, just the portion of the bundle that contains the subresource; so subresources declared earlier are loaded first). Where promises might still be useful for DirectFromSellerSignals is if there's a desire to call @morlovich for visibility [0] Recall that varying the prefix can be used, for instance, to provide different signals for different ad-slots on the page. |
This only covers sellerSignals and auctionSignals, and does not actually permit any parallelism since the browser side just waits for everything to resolve, but it covers a lot of the wiring and is non- trivial in size as-is. See WICG/turtledove#385 (comment) for background Bug: 1394750 Change-Id: I3c341350395744e85b62aa8850f3fa11436e1540 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4052024 Commit-Queue: Maks Orlovich <[email protected]> Reviewed-by: Caleb Raitto <[email protected]> Reviewed-by: Russ Hamilton <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Cr-Commit-Position: refs/heads/main@{#1083774}
If people are able to build working chromium from source + a bunch of patches, the CL chain at https://chromium-review.googlesource.com/c/chromium/src/+/4114383 may be worth experimenting with. It's pretty undercooked (please see warnings in the description) but seems to largely work from basic hand-testing. |
To apply them to a fresh checkout, something like this should work:
|
@morlovich Cool! We are happy to give it a try. @caraitto You are right. It requires the caller to know the path for the resource in the bundle that corresponds to individual slot in advance. It is not currently the case but I think maybe we can come up a solution. Ideally, we would want it to be Promise as well. |
So I've stumbled on a way of make it easier for you to test it; from now on https://chromium-review.googlesource.com/c/chromium/src/+/4120733 should have the combination of all the CLs I am working on to provide this promise + parallelism functionality. To apply them to a fresh checkout you should be able to just do:
This should hopefully reduce the chance of anyone running into intermediate broken states and the like, as those things are very much in development. Edit: should be "git cl patch", not "git patch" |
What will be the type of those signals in the auctionConfig when reporting functions are called, e.g. |
Resolved. https://source.chromium.org/chromium/chromium/src/+/main:content/browser/interest_group/interest_group_browsertest.cc;drc=0e340e634f1a6051908f54175761485f28f985f0;l=7874 may be sort of readable as an example? |
...BeginGenerateBid and FinishGenerateBid. The first call provides all the arguments that are guaranteed to be available (e.g. that cannot be passed as Promises to runAdAuction), and initiates the fetch of trusted bidding signals (coalescing if possible), while the second provides the arguments that may come in as promises once available. The split makes it possible to overlap the times, though the current CL does not attempt to do so outside testing. See WICG/turtledove#385 (comment) for background Bug: 1394750 Change-Id: I22f867319b59c1790043240da2d5a377d86daa1f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4103743 Reviewed-by: Caleb Raitto <[email protected]> Commit-Queue: Maks Orlovich <[email protected]> Reviewed-by: Russ Hamilton <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Cr-Commit-Position: refs/heads/main@{#1088240}
... with startup of worklet process and trusted input signals wait. (Note that this may ignore some rejected input promises if the auction failed anyway without any bidding happening or some kind of fatal error). See WICG/turtledove#385 (comment) for background Bug: 1394750 Change-Id: I1ffb37a43a3aa87e57d9781c7120fc16495b6b60 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111349 Reviewed-by: Russ Hamilton <[email protected]> Reviewed-by: Matt Menke <[email protected]> Commit-Queue: Maks Orlovich <[email protected]> Cr-Commit-Position: refs/heads/main@{#1089914}
This reverts commit b9fa534. Reason for revert: Suspected CL for flakiness in the InterestGroupBrowserTest.RunAdAuctionRejectPromiseAuctionSignals test on Mac builders. See crbug.com/1405717 Original change's description: > FLEDGE: Parallelize wait for promises in AuctionConfig... > > ... with startup of worklet process and trusted input signals wait. > > (Note that this may ignore some rejected input promises if the auction failed anyway without any bidding happening or some kind of fatal error). > > See WICG/turtledove#385 (comment) for background > > Bug: 1394750 > Change-Id: I1ffb37a43a3aa87e57d9781c7120fc16495b6b60 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111349 > Reviewed-by: Russ Hamilton <[email protected]> > Reviewed-by: Matt Menke <[email protected]> > Commit-Queue: Maks Orlovich <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1089914} Bug: 1394750, 1405717 Change-Id: Iaafc559a558ab11f28e4c39983f50860eaa08ed4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4146799 Owners-Override: Jeevan Shikaram <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Auto-Submit: Jeevan Shikaram <[email protected]> Commit-Queue: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1090203}
... After hopefully fixing the flakes (they don't reproduce to me, but the debug output is instructive). Note: if this isn't enough, please disable the tests rather than re-revert this; there is a lot of stuff depending on it including external tests, and these particular tests aren't that important. This is a reland of commit b9fa534 Original change's description: > FLEDGE: Parallelize wait for promises in AuctionConfig... > > ... with startup of worklet process and trusted input signals wait. > > (Note that this may ignore some rejected input promises if the auction failed anyway without any bidding happening or some kind of fatal error). > > See WICG/turtledove#385 (comment) for background > > Bug: 1394750 > Change-Id: I1ffb37a43a3aa87e57d9781c7120fc16495b6b60 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111349 > Reviewed-by: Russ Hamilton <[email protected]> > Reviewed-by: Matt Menke <[email protected]> > Commit-Queue: Maks Orlovich <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1089914} Bug: 1394750, 1405717 Change-Id: I6207c2fd7e13ded3be88401aa5786dcecc8bcd02 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4145903 Reviewed-by: Matt Menke <[email protected]> Commit-Queue: Maks Orlovich <[email protected]> Cr-Commit-Position: refs/heads/main@{#1090356}
... Bringing total promise support in AuctionAdConfig to auction_signals, seller_signals, per_buyer_signals and per_buyer_timeouts total. Nothing special is done with 0 per_buyer_timeout yet. Bug: 1394750 See WICG/turtledove#385 (comment) for background Change-Id: Ib2c73d212f9375eb5d29662a83d3474f93cb1af3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4114383 Reviewed-by: Daniel Cheng <[email protected]> Reviewed-by: Russ Hamilton <[email protected]> Commit-Queue: Maks Orlovich <[email protected]> Cr-Commit-Position: refs/heads/main@{#1091666}
…timeouts" This reverts commit 8ebbe57. Reason for revert: LUCI Bisection identified this CL as the culprit of a build failure. See the analysis: https://luci-bisection.appspot.com/analysis/b/8792208545131485617 Sample failed build: https://ci.chromium.org/b/8792208545131485617 If this is a false positive, please report it at https://bugs.chromium.org/p/chromium/issues/entry?comment=Analysis%3A+https%3A%2F%2Fluci-bisection.appspot.com%2Fanalysis%2Fb%2F8792208545131485617&components=Tools%3ETest%3EFindit&labels=LUCI-Bisection-Wrong%2CPri-3%2CType-Bug&status=Available&summary=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F4114383 Original change's description: > FLEDGE: Support promises for per_buyer_signals and per_buyer_timeouts > > ... Bringing total promise support in AuctionAdConfig to > auction_signals, seller_signals, per_buyer_signals and per_buyer_timeouts total. > > Nothing special is done with 0 per_buyer_timeout yet. > > Bug: 1394750 > See WICG/turtledove#385 (comment) for background > > Change-Id: Ib2c73d212f9375eb5d29662a83d3474f93cb1af3 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4114383 > Reviewed-by: Daniel Cheng <[email protected]> > Reviewed-by: Russ Hamilton <[email protected]> > Commit-Queue: Maks Orlovich <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1091666} > Bug: 1394750 Change-Id: I960fb283cafb5137a71ed26fdecf18c41863deab No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4160911 Owners-Override: Tsuyoshi Horo <[email protected]> Reviewed-by: Tsuyoshi Horo <[email protected]> Commit-Queue: Tsuyoshi Horo <[email protected]> Cr-Commit-Position: refs/heads/main@{#1091670}
…timeouts" This is a reland of commit 8ebbe57 ... with the tests adjusted to account for fixture changes made in https://chromium-review.googlesource.com/c/chromium/src/+/4157177 (which changed how the TaskEnvironment is accessed). Original change's description: > FLEDGE: Support promises for per_buyer_signals and per_buyer_timeouts > > ... Bringing total promise support in AuctionAdConfig to > auction_signals, seller_signals, per_buyer_signals and per_buyer_timeouts total. > > Nothing special is done with 0 per_buyer_timeout yet. > > Bug: 1394750 > See WICG/turtledove#385 (comment) for background > > Change-Id: Ib2c73d212f9375eb5d29662a83d3474f93cb1af3 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4114383 > Reviewed-by: Daniel Cheng <[email protected]> > Reviewed-by: Russ Hamilton <[email protected]> > Commit-Queue: Maks Orlovich <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1091666} Bug: 1394750 Change-Id: I51b37dbdf23919e1e17f7344867261eaa9cc5a7c Fuchsia-Binary-Size: Compressed increase looks like implementation quirk Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4160235 Reviewed-by: Russ Hamilton <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Maks Orlovich <[email protected]> Cr-Commit-Position: refs/heads/main@{#1092719}
Basic support for promises for auction_signals, seller_signals, per_buyer_signals, and per_buyer_timeouts |
So looking into implementing directFromSellerSignals, and I have a question for folks who might use it --- do you expect it to be available at the same time as other signals? (e.g. would you foresee a scenario where it's not a promise and other things are, of where it's a promise that's resolved at substantially different time from others). |
The answer depends on how the directFromSellerSignals is used. Some approaches doesn't require it to be a promise, some does. For one of the main uses cases that we are pursuing , directFromSellerSignals signal will be available and resolved at the same time as other signals. Looping back to @caraitto's comment. I agree that directFromSellerSignals does not necessarily need to be a promise if the prefix can be known at the time runAdAuction is called. In the case of parallelization, this happens before the contextual request is sent. Currently we do not have a way to know the prefix ahead of time. |
@morlovich you earlier asked whether the top-level seller will have to be involved somehow. Assuming that the top-level seller is responsible for assembling pre-conditions for its component sellers' auctions, in addition to those sellers providing their config JSON they will also need to supply their bundle script(s) markup so the top seller can get them on the DOM. Would it make sense to supply these via an optional component auction attribute or better handled out-of-band of the child configs? If there are many resources declared, would bundle scopes be better, or does the browser prefer to have the explicit forward declarations? If a seller/buyer fails the auction because critical bundle resource(s) fail to load, would be nice to be able to track/count these via Extended PA Reporting. <!--
topWindowHostname: www.example-publisher.com
-->
<script type="webbundle">
{
"source": "https://www.example-ssp.com/fledge/dfss/?gen=signals&www.example-publisher.com&pubid=1234",
"resources": [
"https://www.example-ssp.com/fledge/dfss/signal?sellerSignals",
"https://www.example-ssp.com/fledge/dfss/signal?auctionSignals"
/* possibly additional resources registered for per-slot variations, &c. */...
]
}
</script>
<script type="webbundle">
{
"source": "https://www.example-ssp.com/fledge/dfss/?gen=buyer&host=www.example-publisher.com&pubid=1234",
"resources": [
"https://www.example-ssp.com/fledge/dfss/signal?perBuyerSignals=https%3A%2F%2Ffledge.buyer-a.com",
"https://www.example-ssp.com/fledge/dfss/signal?perBuyerSignals=https%3A%2F%2Ffledge.dsp-partner.com",
"https://www.example-ssp.com/fledge/dfss/signal?perBuyerSignals=https%3A%2F%2Ftd.anotherdsp.com"
/* possibly additional resources registered for per-slot variations, &c. */...
]
}
/*
If there are many resources declared, would scopes be better?
Subresource Loading with Web Bundles: https://github.com/WICG/webpackage/blob/main/explainers/subresource-loading.md
*/
</script>
<script>
const myComponentAuctionConfig =
{
'seller': 'https://www.example-ssp.com',
/*
an HTTPS URL prefix (without query string) using the seller's origin
when combined with a browser-provided suffix, the resultant URL should be a resource in a subresource bundle that has been loaded by the current document
(e.g. above)
signals may come from separate bundle files, but each bundle must be served from the seller's origin
See https://github.com/WICG/turtledove/blob/main/FLEDGE.md#25-additional-trusted-signals-directfromsellersignals
*/
'directFromSellerSignals': 'https://www.example-ssp.com/fledge/dfss/signal',
...
'componentAuctions': [
{
'seller': 'https://www.example-ssp.com',
'directFromSellerSignals': 'https://www.example-ssp.com/fledge/dfss/signal',
"interestGroupBuyers": [
'https://fledge.buyer-a.com',
'https://fledge.dsp-partner.com',
'https://td.anotherdsp.com'
],
"perBuyerSignals": {
"https://fledge.buyer-a.com":{...},
"https://fledge.dsp-partner.com":{...},
"https://td.anotherdsp.com":{...}
},
'perBuyerTimeouts': {...},
'perBuyerGroupLimits': {...},
'perBuyerPrioritySignals': {...},
'perBuyerExperimentGroupIds': {},
...
},
{
'seller': 'https://www.someother-ssp.com',
'directFromSellerSignals': 'https://www.someother-ssp.com/fledge/foo/',
"interestGroupBuyers": [
'https://fledge.buyer-a.com',
'https://fledge.dsp-partner.com',
'https://foo-adtech.com'
],
...
}
]
};
const auctionResultPromise = navigator.runAdAuction(myComponentAuctionConfig);
</script> |
|
I've landed direct_from_seller_signals promise support yesterday, but looks like it hasn't quite made canary yet. #453 is an explainer pull request for this stuff. |
Hi,
We would like to share our initial observations with regards to the performance of running FLEDGE auctions. This topic was previously addressed (including an issue #215) but mainly in the context of running JS in a bidding worklet environment. This time we would like to discuss potential latency bottlenecks in an end-to-end runAdAuction call.
We manage to run FLEDGE auctions in a production environment (which means real publishers, real advertisers and our bidding infrastructure with our bidding logic).
In this scenario we run a Chromium browser with FLEDGE enabled, then visit an advertiser’s page (which adds us to 3 interest groups), and finally visit the publisher’s page which runs an auction for these IGs. To measure performance we take advantage of the trace event profiling tool (chrome://tracing).
Benchmark 1 (Intel Core i7-6820HQ 2.7 GHz, Linux, fast internet connection):
Benchmark 2 (Intel Core i7-4600U 2.1GHz, Windows, slow internet connection):
Our observations:
bidder_worklet_generate_bid
but before both a) requesting trusted signals and b) downloading JSBearing in mind that runAdAuction would be run for all participating buyers, and fetching ctx signals and ad rendering will take additional time, we are afraid that this level of latency would not be acceptable for an end user.
The latency of TBS requests could be reduced by replacing BYOS by the key-value TBS and/or by improvements proposed in #333 (TBS prefetching, caching etc.) but it is not clear what to do with the other latencies.
Are you aware of these issues? Do you have plans to address them in the future?
Best regards,
Bartosz
The text was updated successfully, but these errors were encountered: