Git Product home page Git Product logo

Comments (8)

jansmets avatar jansmets commented on June 22, 2024 2

Correct. I specified the parameter --set nexus.resources.limits.cpu=6 to the helm install and nexus now reports 6 cores : The host system is allocating a maximum of 6 cores to the application.

from docker-nexus.

cablespaghetti avatar cablespaghetti commented on June 22, 2024 2

I've found the fix (all credit to Stack Overflow...) https://stackoverflow.com/questions/56946027/nexus-sonatype-nexus33-17-0-on-docker-tells-its-using-only-one-cpu

My INSTALL4J_ADD_VM_PARAMS environment variable is set to -Xms2048m -Xmx2048m -XX:ActiveProcessorCount=4 and everything seems to work properly now.

from docker-nexus.

varditn avatar varditn commented on June 22, 2024

How many cpu have you allocated to the NExus pod and how much is Nexus stating yu have?

from docker-nexus.

jansmets avatar jansmets commented on June 22, 2024

No resource limits have been defined in the podSpec. The container has 6C/12T available

# kubectl -n sonatype-nexus  exec -it sonatype-nexus-0 sh
Defaulting container name to nexus.
Use 'kubectl describe pod/sonatype-nexus-0 -n sonatype-nexus' to see all of the containers in this pod.
/opt/sonatype/nexus # nproc
12
/opt/sonatype/nexus #

In Nexus /admin/support/status I see The host system is allocating a maximum of 1 cores to the application. A minimum of 4 is recommended.

The jvm.log says Nexus is started with these args:

-Dinstall4j.jvmDir=/usr/lib/jvm/default-jvm/jre -Dexe4j.moduleName=/opt/sonatype/nexus/bin/nexus -XX:+UnlockDiagnosticVMOptions -Dinstall4j.launcherId=245 -Dinstall4j.swt=false -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2G -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+LogVMOutput -XX:LogFile=../sonatype-work/nexus3/log/jvm.log -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true -Dkaraf.home=. -Dkaraf.base=. -Dkaraf.etc=etc/karaf -Djava.util.logging.config.file=etc/karaf/java.util.logging.properties -Dkaraf.data=../sonatype-work/nexus3 -Djava.io.tmpdir=../sonatype-work/nexus3/tmp -Dkaraf.startLocalConsole=false -Di4j.vpt=true

from docker-nexus.

jansmets avatar jansmets commented on June 22, 2024

It seems Java looks at the CPU shares, which defaults to '2' if nothing has been specified. Stupid CFS.
It detects more cpu's when I explicitly specify resource requests/limits.

from docker-nexus.

varditn avatar varditn commented on June 22, 2024

So you increased your Nexus pod resource requests/limits and Nexus Identified all the cores?
I suspected something like that. Our setup uses 2 cores node but requests less then 1 core and that is what Nexus detect as well.
If changing resource requests/limits helped your setup, I will apply the same to ours.

from docker-nexus.

alexejmdv avatar alexejmdv commented on June 22, 2024

Hi. Ive the same issue, and after setting nexus.resources.limits.cpu=4, creation of the new pod fails without producing any logs. Does anyone have an idea?

from docker-nexus.

varditn avatar varditn commented on June 22, 2024

@alexejmdv I would need more details. Dou you have a need with enough available cpu ( at least 4 cores) that the pod can be scheduled to ( with matching taints etc..)

from docker-nexus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.