# Running WCG in Ubuntu (Through a VM)



## Supreme0verlord (Dec 23, 2009)

I have been testing/researching this for the past few days and I have found that running WCG in Ubuntu cuts computation time down by about 1 to 2 hours (probably more for you i7/C2Q users), in HCC at least, it's the only project I'm running right now. The easiest way to run Ubuntu (I think) is by running it in a VM.

*NOTE: Ubuntu x64 will stress your CPU more than Windows x64 will, so your OC may not be stable under Ubuntu.

Also, from what I have seen, AMD CPU's benefit from this more than Intels.

Download the Ubuntu iso (http://www.ubuntu.com/getubuntu/download). If you want to, once you burn the iso to a disc (if you do), you can install Ubuntu along side Windows without having to format and create seperate partitions. But I prefer running it in a VM, much more convient for me.
Download and install VMWare Player (http://majorgeeks.com/VMware_Player_d4891.html)

Open VMWare Player and click "Create a New Virtual Machine", then select where you have the iso located. Next you have to enter in your name and password (the password must be at least 8 characters in length). In the next screen, enter the VM's name and where it will be installed. In the next screen, you enter the hard drive size, I just set it at 8GB and click "Store virual disk as a single file". In the next screen, you can customize what hardware the VM will use. For mine I set it to use 4 processors, 768MB of RAM (I would recommend more if your going to be running FightAIDS@Home), and set the network adapter to Bridged (you have to select Bridged in order for Ubuntu to have internet access). Then click finish and Ubuntu will start installing.

Once it's installed, login and click "Applications" then click "Ubuntu Software Center"

In the search box (top right hand corner), search for BOINC. 






Then double click on BOINC Manager, then click install (it will ask you for your password before you can install it), wait for it to download and install.

Then go to Applications > System Tools > BOINC Manager. Then attach World Community Grid (Just enter the URL in the box).





In order to recieve WU's you will have to update the ca-certificates package. Go to Applications > Accessories > Terminal. From there, type in (or copy) these four commands:
(hitting enter after each one)

1. cd /var/lib/boinc-client
2. sudo mv ca-bundle.crt{,.bak}
3. 
	
	



```
sudo wget http://boinc.berkeley.edu/trac/export/16195/trunk/boinc/curl/ca-bundle.crt -O ca-bundle.crt.upstream
```
4. sudo cp -a ca-bundle.crt{.upstream,}

Now the certificates are updated. You should now be able to recieve WU's.

Next I will show you how to change the cc_config to report results immediately (Thanks Mindweaver! ). Go back to Terminal, then type in "sudo gedit /etc/boinc-client/cc_config.xml" (without quotes). Delete everything in the config file (exept for the blue text) then enter in this:

<cc_config>
<options>
<report_results_immediately>1</report_results_immediately>
</options>
</cc_config>

The cc_config file should now look like this:





You can now save the file and close gedit and Terminal. Now all you have to do is go back to the BOINC Manager and click Advanced > Read config file. 

If you want BOINC to run at startup, then go to System > Preferences > Startup Applications. Then click Add and copy this:




Click Add and then close that window, BOINC will now automatically run when Ubuntu starts up. And that's it! 

EDIT: Here's this differences between Windows and Ubuntu. Note that I was running HCC exclusively for both of these.

Windows x64





Ubuntu x64





^(The numbers are lower on 1/14 & 1/15 due to me testing a new CPU)^

As you can see, there is a pretty big difference between the two, mostly Results per day wise, but there is also an increase in points too.


----------



## Chicken Patty (Dec 23, 2009)

Very well done.  I'll review this some other time and see if I maybe try it one day


----------



## Supreme0verlord (Dec 23, 2009)

Take a look at the difference in the CPU benchmarks:
Windows 7 x64 - 3.6Ghz





Linux when run in Windows through a VM - 3.6Ghz





Linux as a standalone installation - 3.6Ghz





My CPU seems to be pretty close to MetalRacer's i7 860 in the benchmarks in Floating Point Speed (not sure what speed it's actually at).





Floating Point MIPS makes the biggest difference in WCG btw.


----------



## Chicken Patty (Dec 23, 2009)

Indeed Linux rules!


----------



## KieX (Dec 23, 2009)

just tried it out. got the VM and the windows clients running at the same time, kinda makes me feel as though this Q9550 has HyperThreading 

:shadedshu too big a performance hit to run them simultaneously though at 100% so I think I'll just switch to pure Linux VM goodness

(can i also ask for a howto on uploading pics?)


----------



## Supreme0verlord (Dec 23, 2009)

Sweet, hopefully you won't have any freezing problems like I did. Just out of curiosity, what were your benchmarks results?

You can upload pics through http://www.techpowerup.org/.


----------



## KieX (Dec 23, 2009)

Supreme0verlord said:


> Sweet, hopefully you won't have any freezing problems like I did. Just out of curiosity, what were your benchmarks results?
> 
> You can upload pics through http://www.techpowerup.org/.



Not having any freezing, although I had to drop to 3.9GHz to run stable. Just ran the inbuilt CPU benchmark, and actually... a little surprised:

Windows 7
3819 Floating Point
11476 Integer

Ubuntu (VM)
3260 Floating Point
13215 Integer

I'm guessing if the Floating Point matters most, Win7 is the one to use. As long as I'm only using the computer for non-strenous stuff I can have both clients running, I'll see what difference it makes at the end of the day.


----------



## Supreme0verlord (Dec 23, 2009)

Well, let it run all day/night and see if it does freeze. It would run fine on my pc when I was using it, but when I let it run overnight, it would be frozen when I woke up the next day. Although it could of just been my OC not entirely stable.

And that is really odd how the Windows client benchmarks higher than the Linux one, that's completely opposite to what I got . Maybe you could run it for a few days and see if your PPD drops any because of it.


----------



## KieX (Dec 23, 2009)

yeah i won't have much time to play games this christmas, so i figure let the crunching go wild and see what makes a difference


----------



## King Wookie (Dec 23, 2009)

Cool. I may have a spare box to crunch with after Xmas, so this is most useful.
Thx.


----------



## Supreme0verlord (Dec 23, 2009)

King Wookie said:


> Cool. I may have a spare box to crunch with after Xmas, so this is most useful.
> Thx.



No problem, glad I could help! 

EDIT: KieX, I just thought of this, did you make sure to download the 64-bit iso instead of the 32-bit one?


----------



## KieX (Dec 23, 2009)

Supreme0verlord said:


> No problem, glad I could help!
> 
> EDIT: KieX, I just thought of this, did you make sure to download the 64-bit iso instead of the 32-bit one?



Yeah Ubuntu 64bit. I'm thinking the slowdown may have something to do with the VM rather than ubuntu itself.

In the virtual processor setup, I've enabled the Intel VT-x since the processor supports it. I'll go into BIOS and turn it off and try with the automatic settings instead. I'll play around a little more till Open Source wins the day

EDIT: It seems the windows 7 system processes for BOINC were still running at the time I benchmarked the VM. The actual performance is: 3858 Floating Point and 16451 Integer. So it's marginal, but there is defenitely an improvement in speed.


----------



## MetalRacer (Dec 23, 2009)

Supreme0verlord said:


> Take a look at the difference in the CPU benchmarks:
> Windows 7 x64 - 3.6Ghz
> http://img.techpowerup.org/091223/WindowsBenchmarks.png
> 
> ...




Thanks for laying this out for us SupremeOverlord.  I have considered trying this in the past but wasn’t sure if it was worth the effort but it looks promising considering my i7 860 is running @3.8 and your Quads performance is very close to it.


----------



## Supreme0verlord (Dec 23, 2009)

KieX said:


> EDIT: It seems the windows 7 system processes for BOINC were still running at the time I benchmarked the VM. The actual performance is: 3858 Floating Point and 16451 Integer. So it's marginal, but there is defenitely an improvement in speed.



I was actually thinking that could of been the problem. Maybe the different benchmarks effect different projects in WCG, like maybe higher Integer speed makes a bigger difference in certain projects.




MetalRacer said:


> Thanks for laying this out for us SupremeOverlord.  I have considered trying this in the past but wasn’t sure if it was worth the effort but it looks promising considering my i7 860 is running @3.8 and your Quads performance is very close to it.



No problem. I would be interested in seeing the difference this would make on an i7, if it goes along with the same pattern as my quad did there should be a significant increase.


----------



## [Ion] (Dec 23, 2009)

I'll try this out in January, but I'm leaving for vacation tomorrow so I don't want to mess things up before I leave


----------



## Chicken Patty (Dec 23, 2009)

[Ion] said:


> I'll try this out in January, but I'm leaving for vacation tomorrow so I don't want to mess things up before I leave



enjoy bro 

Are you rigs going to be on?  Just don't want to  if your PPD drops all of the sudden.  either way, have fun bro and be safe.  Happy Holidays to you and your family!


----------



## [Ion] (Dec 23, 2009)

Chicken Patty said:


> enjoy bro
> 
> Are you rigs going to be on?  Just don't want to  if your PPD drops all of the sudden.  either way, have fun bro and be safe.  Happy Holidays to you and your family!



The E6550 is definitely going to be off, as are both of the Pentium Ms.  I don't think my friend is going anywhere, so his Q6600 should be on the whole time.  I may leave my T400 on (2.4ghz C2D), but I can't guarantee it.  The Q9400 is probably going to be off the whole time, but I'm not sure


----------



## Chicken Patty (Dec 23, 2009)

[Ion] said:


> The E6550 is definitely going to be off, as are both of the Pentium Ms.  I don't think my friend is going anywhere, so his Q6600 should be on the whole time.  I may leave my T400 on (2.4ghz C2D), but I can't guarantee it.  The Q9400 is probably going to be off the whole time, but I'm not sure



Excuses are valid and acceptable, no worries.


----------



## BUCK NASTY (Jan 2, 2010)

Ok, we see the benchmarks, but has anyone seen a vested increase in their output with using the VM?


----------



## Supreme0verlord (Jan 4, 2010)

BUCK NASTY said:


> Ok, we see the benchmarks, but has anyone seen a vested increase in their output with using the VM?



I have no idea if it has increased my point output, but I'm pretty sure it's increased the number of WU's I complete in a day.


----------



## KieX (Jan 15, 2010)

I hope this isn't considered necro-posting, I haven't got the rule of thumb for deciding that yet. I just wanted to share my device statistics regarding this thread.






Ninguishzida/test-PC are the same computer. The first one running linux, the second running windows. The runtime of both machines isn't equal, but the proportional difference speaks for itself. Unfortunately I don't have a similar set-up to the macbook to determine anything for that OS.

Supporting Supreme0verlord's findings, linux returns almost double the amount of work units per runtime, although the actual PPD remains more or less the same. 

Going through the results page of my WCG stats, it is clear that linux is given less points per completed WU than windows, however the increased number of WU's completed makes up for that.

So all in all both OS are more or less equal in PPD, albeit through different methods.


----------



## Supreme0verlord (Jan 15, 2010)

I've actually found that my PPD is higher while running Ubuntu as my main OS.






If I remember correctly, my quad had a hard time getting/staying over 2000 PPD in windows, but under Ubuntu, it seems to be higher.
(Numbers are lower due to testing out new CPU)


----------



## theonedub (Jan 15, 2010)

So this is a wash more or less?


----------



## Supreme0verlord (Jan 15, 2010)

Well I don't know about that, my 7-day average is the highest it's ever been since I've been running this. Plus you return alot more WU's per day, which is what counts right?


----------



## KieX (Jan 15, 2010)

I suppose it may be that different computer hardware sees different levels of improvement. Clearly Supreme0verlord's AMD gets more benefit than my Intel for example. But even if I don't see an improvement in PPD, WCG benefits from more WU's being done.

At the expense of maybe sounding contradictory to my previous post: wether it is an increase of PPD or just more completed WU's Linux certainly presents some benefits over Windows. Not least the fact that if you have more than 1 computer crunching you don't need to keep buying licenses for each one.

I suppose if more people who've tried this show their results Supreme0verloard (or myself if he doesn't want to) could compile a small chart/pro-con list for anyone new to this thread seeking information


----------



## theonedub (Jan 15, 2010)

But if you are getting credited less points per WU to where it all balances out in PPD, why bother?


----------



## KieX (Jan 15, 2010)

At the end of the day completed WU's are what will provide the World Community Grid with more data towards their research. Not our PPD's. And if we loose nothing in terms of PPD, surely that has some WIN WIN factor?


----------



## theonedub (Jan 15, 2010)

I see your point there- its hard to disassociate PPD with efficiency for me.  So running as described in the thread will give us the same PPD but more completed WUs? That surely is win win. I want to see more results before jumping into it. I also would like to see whether or nor this will have an impact on Folding for those who do both on the same rigs.


----------



## KieX (Jan 15, 2010)

Yep, no defenite conclusion can come out of so few examples. So let's hope we get more people giving input on this.


----------

