Skip to content
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

MaxDirectMemorySize #7358

Open
zzkww opened this issue Jan 19, 2024 · 2 comments
Open

MaxDirectMemorySize #7358

zzkww opened this issue Jan 19, 2024 · 2 comments

Comments

@zzkww
Copy link

zzkww commented Jan 19, 2024

Ask your question away

When I run bin/pravega-segmentstore, an error occurs:
2024-01-19 14:59:28,155 1779 [main] INFO i.p.s.server.host.ServiceStarter - MaxDirectMemorySize is 2034237440, Cache size is 40265318 and Netty DM is 2034237440
2024-01-19 14:59:28,167 1791 [main] ERROR i.p.s.server.host.ServiceStarter - Could not create a Service with default config, Aborting.
java.lang.IllegalStateException: MaxDirectMemorySize(2034237440 B) along with JVM Xmx value(2034237440 B) is greater than the available system memory!
at com.google.common.base.Preconditions.checkState(Preconditions.java:512)
at io.pravega.segmentstore.server.host.ServiceStarter.validateConfig(ServiceStarter.java:290)
at io.pravega.segmentstore.server.host.ServiceStarter.validateConfig(ServiceStarter.java:284)
at io.pravega.segmentstore.server.host.ServiceStarter.main(ServiceStarter.java:378), but I have not defined such a large number: 2034237440?

@RaulGracia
Copy link
Contributor

@zzkww right, it looks like you have to configure the memory settings of your segment store to the available memory. Note that the defaults may be too large if you are running the Segment Store on a tiny instance, and therefore you see this error.

We wrote a simple guideline to set the Segment Store memory, please have a look: https://cncf.pravega.io/docs/latest/admin-guide/segmentstore-memory/
Once you read that document, it should be clear to you how to set the memory of the segment store in the right way, based on the memory available in your server.

@zzkww
Copy link
Author

zzkww commented Jan 19, 2024

@zzkww right, it looks like you have to configure the memory settings of your segment store to the available memory. Note that the defaults may be too large if you are running the Segment Store on a tiny instance, and therefore you see this error.

We wrote a simple guideline to set the Segment Store memory, please have a look: https://cncf.pravega.io/docs/latest/admin-guide/segmentstore-memory/ Once you read that document, it should be clear to you how to set the memory of the segment store in the right way, based on the memory available in your server.

But my settings in the values.yaml file are like this. Why does such a large value appear: 2034237440
segmentStore:
replicas: 1
maxUnavailableReplicas:
secret: {}
# name:
# path:
env:
containerEnv: {}
containers: {}
additionalVolumes: {}
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 500m
memory: 2Gi
securityContext: {}
# runAsUser: 0
affinity: {}

service type and annotations are ignored if external access is disabled

service:
## used to override the service type for segmentStore
type:
annotations: {}
loadBalancerIP:
externalTrafficPolicy:
jvmOptions: ["-Xms256m", "-Xmx256m", "-XX:MaxDirectMemorySize=512m", "-XX:+ExitOnOutOfMemoryError", "-XX:+CrashOnOutOfMemoryError", "-XX:+HeapDumpOnOutOfMemoryError", "-XX: HeapDumpPath=/tmp/dumpfile/heap", "-XX:MaxRAMPercentage=50.0", "-XX:+UseContainerSupport", "-XX:+PrintExtendedThreadInfo"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants