1 reply [Last post]
Joined: 08/09/2010

Problems detected on linux running Foldit:

corrupted double-linked list when exit
stack overflow
segmentation fault
broken pipe

For example, if you play a puzzle with filters enabled as 1030 and you run a recipe with fast functions (on Foldit each function execution is a new thread) like: while(true) do structure.InserCut(2) structure.DeleteCut(2) end, it crashes.
I have seen two reasons: too much memory used in stack, and race conditions between threads. On linux by default the stack size is 8MB, very small for Foldit. Do this on shell before running Foldit:

ulimit -s unlimited

It works great :)

About broken pipe, segfault, and problems with threads I run Foldit under gdb, and it doesn't crash (I haven't noticed slowdown).

gdb ./Foldit
> run

About movement of memory, quicksaves, memory for inodes (recentbest, absolutebest...), and the core itself (about 1GB for each Foldit client running) we can improve it getting down the swap priority. The default value of swappiness on Linux is 60, very high, cause of kernel testing purposes. You can see the value writing:

cat /proc/sys/vm/swappiness

A value of 100 implies a exhaustive use of swap. 0 means don't use swap. I highly recomend a value of 20 to improve performance (Foldit is doing malloc and free very intensively). Write as root:

echo 20 > /proc/sys/vm/swappiness

With this you'll have a slightly more stable Foldit.
I know that using gdb seems exaggerated, but you will have Foldit running for several days ;)

Joined: 04/24/2014
Groups: None

I've passed this on to our devs to see what thoughts they may have on this. Thanks for letting us know!


Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, Boehringer Ingelheim, RosettaCommons