zhkzyth
V2EX  ›  问与答

mac os的ulimit设置不生效?

  •  
  •   zhkzyth · Dec 3, 2013 · 16785 views
    This topic created in 4552 days ago, the information mentioned may be changed or developed.
    我想在自己的mac上做一些簡單的壓力測試,但发现mac系统无法把maxprocess设置得非常大.

    测试场景:想測1k-2w左右的併發連接,用ab test工具,当并发量上到1k的时候老是出现connection reset的情况.

    我参考了下面的资料:
    http://superuser.com/questions/508227/mac-os-x-10-7-4-process-limit

    系统参数:
    Processor 2.4 GHz Intel Core 2 Duo
    Memory 8 GB 1067 MHz DDR3
    Graphics NVIDIA GeForce 320M 256 MB
    Serial Number W80288R1ATM
    Software OS X 10.8.5 (12F45)


    我设置的大小为40,000,按照上面st里面答案的说法,我重启后发现`-u: process`还是709...好悲剧.....
    4 replies    1970-01-01 08:00:00 +08:00
    jiangpeng
        1
    jiangpeng  
       Dec 3, 2013   ❤️ 1
    貌似 8G 内存最大只能到 2500
    http://support.apple.com/kb/HT3854
    ShadowStar
        2
    ShadowStar  
       Dec 3, 2013
    之前在做工具链编译glibc时遇到过这个问题,某个目录中makefile的嵌套include。
    limit的值有一个上限,sysctl可以找到,设置为unlimit或limit超过上限,实际还是默认值;设置一个不超过上限的值是有效的。
    zhkzyth
        3
    zhkzyth  
    OP
       Dec 3, 2013
    @jiangpeng , 萬惡的蘋果,搞得我直抓狂=.=...有卸了它的衝動

    @ShadowStar , 我試過2048,確實是可以的,就跟jiangpeng說的一樣.....蘋果幹甚搞那麼弱智的設定啊...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1158 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 17:55 · PVG 01:55 · LAX 10:55 · JFK 13:55
    ♥ Do have faith in what you're doing.