URL:
  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4543>

                 Summary: Lower CPU usage (mldonkey 2.6.x)
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: mlpango
            Submitted on: dim 23.10.2005 à 17:34
                Category: Bug fixes
                Priority: 5 - Normal
                  Status: None
             Assigned to: spiralvoice
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

Several people have reported high CPU usage, or symptoms that could be
related to a high CPU usage (web interface sluggishness, lowid from servers,
upload speed drop,...). See
http://mldonkey.berlios.de/modules.php?name=Forums&file=viewtopic&t=3859

After some profiling (see
http://download.berlios.de/pub/mldonkey/pango/profiling/), it seems that
CommonSources.count_file_ready_sources is using way too many cpu cycles: it's
both costly (scanning whole sources queues), and used often (once every 2ms on
average on my test!).

Here's a patch that tries to make it more efficient (strength reduction and,
*sig* early abort using an exception), and also called less often by some
optimization of find_max_overloaded.

On the same computer (P3 500MHz), a popular download now uses ~ 20% of cpu,
with very few usage peaks. Network traffic is much smoother.

There's probably more to do (Why is this function called this often ? What
other functions need to be optimized ?...)






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: dim 23.10.2005 à 17:34  Name: count_file_ready_sources_optim_v2.patch 
Size: 3,87Ko   By: mlpango

<http://savannah.nongnu.org/patch/download.php?item_id=4543&item_file_id=5357>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4543>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/



_______________________________________________
Mldonkey-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/mldonkey-users

Reply via email to