Scrapy performance Tuning and detection performance issues

Source: Internet
Author: User
Tags cpu usage

As already mentioned, the bottleneck of Scrapy is set in the place of the downloader. For maximum performance, you can start with a low concurrent_requests and increase this value until you reach one of the following limits: CPU usage reaches a significant increase in latency for 80-90% target sites The total memory size of all response objects in scraper (that is, reptiles and pipeline) does not exceed 5MB

Also ensure that the scheduler queue (MQS/DQS) has some requests at all times to ensure that the requested number in the downloader never uses blocked code or CPU-intensive code (in which case another thread should be used)

The previous figure summarizes the steps for diagnosing and repairing scrapy performance issues.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.