• Michael Crouse's avatar
    Limit the number of host model features being requested/stored. · 8f5bb31b
    Michael Crouse authored
    This change limits the number of hosts that are requested
    requested by the prediction model fetcher from the remote
    optimization guide service and is finch controllable. This will
    improve the request latency and load on the remote optimization guide
    service. It will also limit the total number of host model features
    maintain on the client. Additionally, only hosts that are not already
    in the host model features cache will be included in the request.
    
    This change also implements a least-recently-used in-memory cache for
    the host model features that the prediction manager maintains.
    The maximum size is controllable via finch and the default is set
    to hold 95% of all users hosts without needing to evict any host model
    features.
    
    Bug: 1036399
    Change-Id: Ice9ab7c3c3505fc970ab72e1c78f5d628cd5157b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1981632
    Commit-Queue: Michael Crouse <mcrouse@chromium.org>
    Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
    Reviewed-by: default avatarSophie Chang <sophiechang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#727838}
    8f5bb31b
prediction_model_fetcher.cc 7.63 KB