zoukankan      html  css  js  c++  java
  • fork failed.: Cannot allocate memory

    在做压力测试时候:

    [root@666 ok]# webbench -c 5000 -t30 http://10.100.0.61/
    Webbench - Simple Web Benchmark 1.5
    Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
    
    Benchmarking: GET http://10.100.0.61/
    5000 clients, running 30 sec.
    
    Speed=176440 pages/min, 4025737 bytes/sec.
    Requests: 88219 susceed, 1 failed.
    [root@666 ok]# webbench -c 50000 -t30 http://10.100.0.61/
    Webbench - Simple Web Benchmark 1.5
    Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
    
    Benchmarking: GET http://10.100.0.61/
    50000 clients, running 30 sec.
    problems forking worker no. 6594
    fork failed.: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    bash: fork: Cannot allocate memory
    ....
    bash: cannot make pipe for command substitution: Too many open files
    

     查询pid_max值:

    [root@666 ok]# sysctl kernel.pid_max
    kernel.pid_max = 32768
    

     修改pid_max的值:

    [root@666 ok]# sysctl -w kernel.pid_max=60000
    kernel.pid_max = 60000
    [root@666 ok]# sysctl kernel.pid_max
    kernel.pid_max = 60000
    
    [root@666 ok]# echo 'kernel.pid_max=9999' >>/etc/sysctl.conf 
    [root@666 ok]# sysctl -p
    kernel.pid_max = 9999
    
  • 相关阅读:
    C++ version the delaunay triangulation
    Jason Saragih's Homepage
    asm/aam links
    自动白平衡算法效果图
    What algorithm to use to normalize someone's face on image
    神奇的图像处理算法
    计算机视觉牛人博客和代码汇总
    雅虎开源色情图片检测神经网络
    蚁群算法
    时间序列分析
  • 原文地址:https://www.cnblogs.com/bass6/p/7102524.html
Copyright © 2011-2022 走看看