https://www.growthbook.io/ logo
#announcements
Title
# announcements
f

freezing-apple-73992

07/19/2023, 10:16 AM
Hi Team, Actually, we are facing high cpu usage problem when we are trying to figure out variations for a user. SDK - JAVA Features Count - 200 Load - 100 TPS CPU Usage goes upto - 80% Are we doing something wrong?? or it this expected ?? Please Help!!!
s

swift-helmet-3648

07/19/2023, 3:56 PM
Hi, @freezing-apple-73992 let me take a look into this. Are you a cloud user or self-hosted?
b

better-magician-65629

07/19/2023, 5:31 PM
is this in your java app, or on your self-hosted instance?
f

freezing-apple-73992

07/26/2023, 6:04 AM
Yes..this is a java app...
I am a self-hosted user...
b

better-magician-65629

07/26/2023, 4:49 PM
thanks for clarifying. is it the self-hosted growthbook instance that is causing the feature usage to spike, or is it your java app? we'd like to pinpoint if there's an issue in the java SDK or if this is with the growthbook deployment itself.
f

freezing-apple-73992

07/31/2023, 6:14 AM
The sdk part... Is kind of causing the spike
b

better-magician-65629

07/31/2023, 7:22 PM
can you tell us about your implementation? • which version of the java SDK are you using? we released 0.8.1 a couple weeks ago and it has a minor fix that may have impacted performance. if you are on an earlier version, try updating and seeing if that helps. • what framework are you using, if any (e.g. spring, micronaut, ktor, etc.) • can you share your features URL (if public, unencrypted)? i want to see if there may be issues due to the size of the features JSON. • can you share the code you're using for networking, e.g. your implementation of the GBFeaturesRepository or where you're making the calls manually • have you done any profiling to pinpoint the cause of the problem? e.g. is it in the networking implementation, or in the feature or experiment evaluation? previously a user mentioned that the example in our docs (which uses
<http://java.net|java.net>.http.HttpClient
) is not performant in spring. if using spring, did you look at the spring examples? there's several implementations in here (e.g. using the GBFeaturesRepository class, or making calls with your own networking implementation). there may also be a better way to do the same thing in spring or your framework of choice—the repository class is meant to be framework agnostic.
5 Views