Giter Site home page Giter Site logo

减少内存占用 about pholcus HOT 3 CLOSED

andeya avatar andeya commented on August 25, 2024
减少内存占用

from pholcus.

Comments (3)

andeya avatar andeya commented on August 25, 2024

你检查过你的I/O输出情况吗?
批量输出的大小、并发的多少都会影响内存的;
输出与抓取是异步的,假如输出始终慢于抓取速度,那么内存就会一直增加;
另外,你的规则逻辑、带宽也很重,问题是多方面的;
你从我提到这几方面,做一下分析。

from pholcus.

andeya avatar andeya commented on August 25, 2024

另外,我不知道你的使用的版本是不是含义gc回收监控的,这个一定程度也可以抑制内存增长。
因为go的对闲置内存是不会马上归还系统的,而Pholcus又是在高速运行,产生大量垃圾,因此gc的效果就不那么明显了,加了手动gc,可以一定程度弥补这一缺陷。

from pholcus.

vvvsrx avatar vvvsrx commented on August 25, 2024

非常感谢回答!你说的几点对我来说是非常重要的信息~
I/O目前用的SSD,走的mysql,10000条信息存一次,用的系统默认,代码方面。是按照官方的写法做的,字段其实很少。GC方面我要研究下,还没接触过,总之,感谢!

from pholcus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.