V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2018-04-17 13:34:45 +08:00 · 1590 次点击
    这是一个创建于 2172 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    wjpdev
        1
    wjpdev  
       2018-04-17 14:34:01 +08:00
    我选方案 2, 线程间消耗 小于 进程间消耗。 开 10 个 docker 跑任务属于进程级别.

    区别在于 10 个线程挤在同一个 JVM 里面,10 个 docker 开了 10 个 jvm. 如果物理机 jvm 内存总占用一样大,何不就将一个 JVM 的内存占用比设大一点。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1002 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 20:03 · PVG 04:03 · LAX 13:03 · JFK 16:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.