• 请不要在回答技术问题时复制粘贴 AI 生成的内容
cherubzg
V2EX  ›  程序员

docker 服务器集群 内存 管理 请教

  •  
  •   cherubzg · Sep 28, 2016 · 3345 views
    This topic created in 3531 days ago, the information mentioned may be changed or developed.

    个人鼓捣了下服务器:
    nginx + gitbilt + jenkins + docker
    服务器内存 2G 跑了8个 docker-container
    2G的内存差不多就榨干了,求教大神》》》
    docker容器的内存应该管来着 一个container 256M的内存可以减少否,最合理的内存大概多少左右合适嘞


    sc个人博客 http://www.seraph-fd.cn

    5 replies    2016-09-28 17:04:37 +08:00
    Busy
        2
    Busy  
       Sep 28, 2016
    两个参数
    --memory ram
    --memory-swap ram+swap
    cherubzg
        3
    cherubzg  
    OP
       Sep 28, 2016
    @Havee 那对于 nodejs 来说因为是单线程的,我只要最小化 memory-swap ,然后用 ngnix 转发请求到新创建的 docker<br/>就能最大限度的使用 cpu 了是不
    Busy
        4
    Busy  
       Sep 28, 2016
    @cherubzg 你究竟是限 cpu 还是内存呃
    cpu 的话,你可能需要以下参数
    --cpuset-cpus
    --cpu-shares
    --cpu-period
    --cpu-quota
    cherubzg
        5
    cherubzg  
    OP
       Sep 28, 2016
    @Havee tks
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2840 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 198ms · UTC 09:13 · PVG 17:13 · LAX 02:13 · JFK 05:13
    ♥ Do have faith in what you're doing.