Opened 10 years ago

Closed 10 years ago

Last modified 6 years ago

#2379 closed patch (Fixed)

Move cleanup of prev_status from torrent.py to torrentmanager.py

Reported by: bro Owned by:
Priority: minor Milestone: 2.0.0
Component: Core Version: develop
Keywords: Cc:

Description

Each torrent instance has a LoopingCall? that cleans up the prev_status dictionary regularly. With a lot of torrents the number of LoopingCalls? starts to generate a lot of CPU usage.

This patch replaces the LoopingCalls? for each torrent with one LoopingCall? in torrentmanager.py. I tested on my desktop copmuter with the daemon running idle (not downloading/seeding or with clients connected).

With 5000 torrents the CPU usage was reduced from 26-40% to 3-5%. With 10000 it was reduced from 50-60% to 5-6%.

Change History (7)

comment:2 Changed 10 years ago by andar

This looks good. Can you commit it?

comment:3 Changed 10 years ago by bro

I don't think I have the permissions ;-)

comment:4 Changed 10 years ago by Cas

  • Resolution set to Fixed
  • Status changed from new to closed

Committed to develop: [feaeee0379]

comment:5 Changed 10 years ago by Cas

  • Milestone changed from performance to 1.4.0

comment:6 Changed 8 years ago by Cas

  • Milestone changed from 2.0.x to 2.0

comment:7 Changed 6 years ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.