Foldit Wiki
(Adding categories)
Tags: Visual edit apiedit
Line 91: Line 91:
 
==See also:==
 
==See also:==
 
http://foldit.wikia.com/wiki/Multiple_Foldit_Clients
 
http://foldit.wikia.com/wiki/Multiple_Foldit_Clients
  +
  +
Video: [https://www.youtube.com/watch?v=TWaHyCHhFZo&list=PLzgO42BPIbEA5aIpa4V19QpmvXse7n6l3&index=2 Running Foldit in Multiclients (for Windows)]
  +
 
[[Category:Multi-clients]]
 
[[Category:Multi-clients]]
 
[[Category:Linux]]
 
[[Category:Linux]]

Revision as of 16:35, 27 February 2017

Foldit allows players to run multiple clients at the same time. With multiple clients, players can work on more than one puzzle at same time, or pursue different solutions to one puzzle.

With many newer PCs, it's possible to run more than one foldit client at nearly full speed. This is because most microprocessors are actually multiprocessors. Current desktop systems may have 8 independent processors or CPUs (central processing units), and many laptops have 4 CPUs.

Each foldit client does most of its work in a single "thread", which can use up to 100% of one CPU. So running one foldit client on an 8-CPU desktop can use only a little more than 1/8 of processing power available.

This page describes one way to set up multiple clients on a single Windows PC. The basic concepts should apply to the Linux and Mac environments as well, especially since the underlying hardware is now more or less the same.

one folder, one client

On Windows, foldit is installed in a single folder (directory), for example c:\foldit. The foldit installation is "portable", meaning you can move or copy the installation directory and then run foldit from the new location without doing anything else. (Many Windows programs are not portable, and must be reinstalled to move them to a new location.)

Foldit allows you to start as many clients as you want from a single installation folder, but this approach has problems. For example, when running scripts, each client will want to write script output to a file called "scriptlog.default.xml".  With two or more clients running scripts at the same time, each client will add its results to "scriptlog.default.xml", so you'll have a few lines from one script followed by a few lines from another script. This makes the results hard to interpret.

Foldit also writes various other files, including files specific to a given puzzle. Running multiple clients from a single folder is likely to cause problems with these files being overwritten.

Running each foldit client from a separate folder is highly recommended.

Since the foldit installation is portable, it's not necessary to re-run the foldit installer for each client. Instead, use Windows Explorer to copy and rename the original install folder. This preserves all the foldit settings, including downloaded scripts.

how many clients?

When running a script, each foldit client can use slightly more one CPU. For example, on an 8-CPU system, foldit clients seem to average around 15% of total CPU. This is slightly more than the 12.5% of one CPU running at 100%.

Given this usage pattern, a conservative client limit is one client less than the CPU count, for example 7 clients on an 8-CPU desktop or 3 clients on a 4-CPU laptop. Using this approach, each client can run almost as fast as a single client. Unfortunately, this means that older or less powerful system with only one or two CPUs can only run one client at top performance.

Running more clients means each client will run more slowly than it could, since it will spend part of its time waiting for a CPU to become available. Also, Windows itself tends to become sluggish or unresponsive when total CPU usage is near 100% for extended periods of time.

how many CPUs?

One way to determine the number of CPUs is to look at the "Performance" tab of Windows Task Manager.

Task Manager can be started by right-clicking an empty spot on the menu bar and selecting "Task Manager" or "Start Task Manager" or by typing "taskmgr" at a run prompt.

On the "Performance" tab, the "CPU Usage History" section may be split into two or more graphs. Each graph represents one CPU.  If there is only one graph, check that "One Graph Per CPU" is set via View -> CPU History.

Task Manager Multi Processor

Windows task manager showing four processors (CPUs)





Task Manager Performance Win 7 Multi Core 01

Task Manager one graph per CPU setting (Windows 7)


























See also:

http://foldit.wikia.com/wiki/Multiple_Foldit_Clients

Video: Running Foldit in Multiclients (for Windows)