我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何针对我服务器上的资源优化PHP中的多线程

I have a crawler that uses cURL to scrape data from many arrays of URLs but this is rather slow and I'd like to accelerate it using multi-threading by forking into several child processes that run concurrently.

The question is how do I determine the optimal number of threads? I have a decent dedicated server, but I'm not sure how to calculate and allocate those resources to run my scripts in the least amount of time.

近期文章

  • 管理面板中的Joomla 404错误
  • 类不输出
  • 如何在php中阅读多个Docx
  • Linux bash脚本模拟输入
  • 通过ajax传递数组和其他数据
  • 如何使用MYSQLI更新表单
  • CSS:并非所有文本都与图像对齐
  • 如何在wordpress短代码中使用php if语句?
  • 尝试使用表单向MYSQL添加多个记录
  • 如何使我的Facebook像脚本循环每3秒一次?
  • PHP file_get_contents和重音URL(4行代码示例)
  • PHP | IIS | 上传超出大小限制崩溃
  • 如何在wordpress移动主题中更改搜索栏的位置
  • PHPUnit中使用shouldReceive进行随机输入的模拟方法
  • 从silex中的服务提供者获取调用类/方法
  • 如何获得bootstrap背景图像轮播导航工作?
  • 在WordPress中获取媒体中所有文件的元数据
  • PHP,Wordpress | $ _server'request_uri'没有全斜线。 没有.htaccess
  • Facebook SDK v4 $ session无效
  • 如何在使用MySQLi时防止SQL注入

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华