lyft / lyft/awspricing

Excessive memory usage

Open
#42 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
214
Forks
52
PR merge metrics
No merged PRs in 30d

Description

The library uses a excessive amount of memory, at least 2GB reading from cached data and as much as 3.5GB reading fresh data from the API. This results in excessive initialization times even in cached mode (30 seconds or more).

The net effect results in this library being much less useful that it might otherwise be. For example, it's nearly impossible to use this from Lambda given the hard memory cap of 3GB and high cost of such configurations.

Much of this is surely a side effect of the limited nature of the underlying AWS Pricing data and APIs, but I believe it can be addressed. I'm going to look into alternative methods for both pulling down the initial data as well as breaking up the cache into shards of some flavor to avoid the need to load the entire json blob into memory at once.

Contributor guide

Open the contributing guide

Research direction

Start by profiling initialization when reading cached data and when fetching fresh data from the AWS API, recording memory use and initialization time. Compare approaches for loading the initial pricing data and for sharding the cache. Done means substantially lower memory usage and faster initialization, including within the stated Lambda constraints.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.