推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
asfdasf32
V2EX  ›  Python

请问一个设计需求是否合理 3?

  •  
  •   asfdasf32 · Apr 17, 2018 · 2594 views
    This topic created in 3095 days ago, the information mentioned may be changed or developed.

    场景:在一个 celery 分布式队列场景下,任务已经分配到各个节点。 方案 1:每个客户端节点我起来 10 个 docker 去执行这个任务;方案 2:我每个客户端开 10 个线程去执行这个任务

    想请问开 10 个 docker 的这种方式真的会快吗,再考虑性能消耗等方面,这样合理吗?

    wjpdev
        1
    wjpdev  
       Apr 17, 2018
    我选方案 2, 线程间消耗 小于 进程间消耗。 开 10 个 docker 跑任务属于进程级别.

    区别在于 10 个线程挤在同一个 JVM 里面,10 个 docker 开了 10 个 jvm. 如果物理机 jvm 内存总占用一样大,何不就将一个 JVM 的内存占用比设大一点。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2787 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 13:22 · PVG 21:22 · LAX 06:22 · JFK 09:22
    ♥ Do have faith in what you're doing.