Optimizing MLDonkey for your NAS

You may find that MLDonkey consistently uses high amount of memory and cpu. There are some simple configurations you can use to tune/optimize your instance of MLDonkey.

This guide is for users running the MLDonkey cores compile by shadowandy (me). The MLDonkey home directory points to “/mnt/HD_a2/mldonkey” so if you have changed the home directory, change the commands appropriately.

Disabling GeoIP

GeoIP maps IP addresses to geographical locations. For example, it will tell you that the IP 165.21.123.123 is from Singapore. Most people would not need this function. To disable GeoIP, ensure that your MLDonkey is not running and you have a telnet/ssh connection to your NAS.

  1. In the command prompt, type the command vi /mnt/HD_a2/mldonkey/downloads.ini and hit <Enter>
    You should be looking at the options for MLDonkey
  2. Type the command /”geoip.dat” and hit <Enter>
    The cursor should jump to the line containing the text “geoip.dat”
  3. Type the command / and hit <Enter>
    The cursor should jump to another line containing the text “geoip.dat”
  4. Type the command dd
    The original line should be deleted
  5. Type the command :wq and hit <Enter>
    The file would be saved and you will be greeted by the command prompt
  6. Type the command rm /mnt/HD_a2/mldonkey/web_infos/GeoIP* and hit <Enter>

Running MLDonkey

MLDonkey uses an IPFilter hence the starting up is slightly slower and use quite a bit of memory. This is the trade off for security. If you wish to further lower the memory usage, follow the previous section, but deleting the line containing “guarding.p2p” this time round. Lets proceed to starting MLDonkey

  1. In the command prompt, type the command sh /ffp/start/mlnet.sh start and hit <Enter>
    The system should respond by printing “Starting mlnet..”

Wait for the core to fully start up before proceeding to the next section.

Tuning other options

We will attempt to reduce the resource usage by MLDonkey.

  1. In the command prompt, type the command telnet 127.0.0.1 4000 and hit <Enter>
    You should be greeted by mldonkey command-line
  2. Type the command set ip_blocking_descriptions false and hit <Enter>
    You should see “option ip_blocking_descriptions value changed”
  3. Type the command set space_overhead 48 and hit <Enter>
    You should see “option space_overhead value changed”
  4. Type the command set emule_mods_count false and hit <Enter>
    You should see “option emule_mods_count value changed”
  5. Type the command set emule_mods_showall false and hit <Enter>
    You should see “option emule_mods_showall value changed”
  6. Type the command set ED2K-max_sources_per_file 1152 and hit <Enter>
    You should see “option ED2K-max_sources_per_file value changed”
  7. Type the command set share_scan_interval 120 and hit <Enter>
    You should see “option share_scan_interval value changed”
  8. Type the command save and hit <Enter>
    You should see “options and sources saved”
  9. Type the command kill and hit <Enter>
    You should see the command prompt

MLDonkey has been tuned. It should run better the next time you start it. You can start MLDonkey by using the command sh /ffp/start/mlnet.sh start

Check out more information over at MLDonkey’s Wiki.

 

Treat shadowandy!

If these step-by-step guides have been very helpful to you and saved you a lot of time, please consider treating shadowandy to a cup of Starbucks.  

Comments are closed.