• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Programming a distributed system

TEK NINJA

Gawd
Joined
Nov 12, 2000
Messages
827
I have been programming raytracing and path tracing systems for fun recently. Path tracing seemed particularly interesting, because its very simple to implement, yet very accurate in the end. Its a global illumination technique that is a direct extension of raytracing. Its only downside, is that its very slow, on a single modern computer.

I have been able to generate this in a few hours on my Thunderbird 1.33 GHz:

screen0156.gif


As you can see, the image is not perfectly accurate. It has what seems like noise, because the approximation is not accurate enough. Getting a more accurate approximation requires more processing time. I have estimated that in order to get a visually acceptable image in 640x480 using that technique would take my Thunderbird 1.33 GHz about a month.

So here I am ;) I am thinking of programming a server-client based distributed system. The system would be mainly for the purpose of experimentation... I could even possibly make the code open source. The system would comprise a server (my Netserver LH3 webserver), which would constantly update the rendered picture as the process goes on, and many clients, being people who would download a small zip package with a client executable. A large image would be rendered (perhaps 1280x960, or 1600x1200), which could potentially serve as desktop background picture in the future ;)

Would any people with spare CPU cycles be interested? I believe I could develop this system within one week of time. A windows client would come first, but the code I have right now is very portable, so if anybody wanted to help, it would be possible too. There would be no specific requirements. Any machine with an internet connection could download work units and process them, and they would all contribute to the final render :)

------------------------------------------------------------------------------------------

EDIT: The system is operational

Thats right, for those who haven't been following this thread: the rendering system now works. You can visit the RenderMax DRS page at:

http://www.xgameproject.com/rendermax

If you want to participate in this effort, the client is available for download, its a very small file, and all you have to do is run the program.
 
that sounds VERY cool. i can take a computer or two off of F@H for a week or so to help you out. and if it comes out good enough, it'll be my new background :)
 
Cool to see someone is already interested ;)

I think I have figured a way to make this work with a reasonably low bandwidth... Like 1MB of upload per hour, per client. My server has 3 Mbps of download speed (1350 MBs per hour). And the processing speed of the distributed system is linear with the power of the client computers :)

What kind of hardware do you have PPatBoyd?
 
not the best, but i run it 24/7 and will just try to not play as many games so the pic gets better :)

one's a lapper, 2ghz, ~384 shared RAM but i only surf web listen music etc on this.

then a desktop that's 2 ghz, 512 RAM and i play off of but as i said i'll play on diff comp or something (diff comp = diff games here, stupid fuxorian brothers scratch up discs and after an uninstall, reinstall no worky : \). so if anyone wants to play some DOTA, send me a PM :p
 
Thats cool :)

I have already started setting up the png file output so that we can have a page on my site where the progress of the rendering will be displayed :)
 
If you swear you won't steal my Data, I'll give you a month's worth of free Athlon XP 2.4GHz cycles ;)
 
No risk of data theft ;) I could even give you the source if you want to make sure. I gotta get coding this fast ;) I hope to have it ready by the end of the next weekend. Its mostly a matter of setting up the network code and the webpage output, as the rendering code already works.
 
TEK NINJA, I absolutely love your Cornell box, with noise and all! My hat is off,
and my back is bent to anyone that writes their own ray-tracer! ;)

Although, this may not be the forum to discuss this in, since you may be stealing GHz
from the [H]ard|OCP Stanford F@H efforts, I'd recommend perhaps Webmastering &
Programming (if you need development help) or even Digital Artwerk if you'd like some
feedback on your render quality (I won't cry if you pimp your distributed efforts there).

bowdown.gif


PS: Expect a PM from me! ;)
 
Heheh!

I am doing the exactly same project :D

Expect that I am using povray as my renderer.

I am done most of the server code (in Java)

Just need to code up the rest and make the client code (going to be in c++)

I checked out some prices and it's really cheap to make your own $2000 CAN render farm. 2k will get you a ~20GHz farm (10x 2Ghz). Not bad for 2k!
 
Yeah, but I am totally out of money! I got myself a summer job, but it will just pay one semester of university! (I start uni in computer science next september). Trust me, if I could have my own render farm, I would...

But with this program... It will be possible to render with machines all over the internet, with no speed loss due to bandwidth (well, not more than 1% or so). It will also be usable over a LAN... So if I ever got more machines, it would work too.

And Hyperion. Well. I just don't think programmers would help me much. They would tell me that my rendering technique is too inefficient, and that this is all pointless. Which its not, since the main point, for me, is to learn in the process. I don't want to disrupt other efforts, but I think there might still be some room left. I mean, with my project, even 100 MHz pentiums could work (if there are many of them). Surely some people must have unused machines ;)

On another note, I don't see where those private messages are?!?
 
I could switch a few machines over to help out. PM me when you want to start. I'd love to contribute.
 
I will start next weekend, hopefully. Still debugging the png image output at the moment... libpng could seriously have been done better.
 
Allright people, I got the PNG output working, with a better library :) I'm going to start making this client-server based.
 
TEK NINJA said:
...But with this program... It will be possible to render with machines all over the internet, with no speed loss due to bandwidth (well, not more than 1% or so). It will also be usable over a LAN... So if I ever got more machines, it would work too.
...

Yeah, currently my program will use about 50mbps for about 10x 2GHz computers, but that's cuz I didn't buffer my packets.

Are you making your program send the bitmap section after it's done, or by pixels in real-time?
 
Pyrolistical said:
Yeah, currently my program will use about 50mbps for about 10x 2GHz computers, but that's cuz I didn't buffer my packets.

Are you making your program send the bitmap section after it's done, or by pixels in real-time?

Lets just say a cluster could be connected through a 56k modem and not waste performance ;)

On another note. I am done programming a resampling mechanism. This will allow me to make a large render (1600x1200, suitable for a wallpaper), and at the same time display a smaller version (800x600) on a webpage, to show the progress of the rendering.

I made a sample webpage to show what it could look like:

http://xgameproject.com/rendermax/

The image on that page, when the rendering system is operational, will be updated each 10 minutes, and various statistics will be displayed.
 
Allright, the programming is going well :)

All I want done:

- PNG output [X]
- Image resampling [X]
- Dynamic image generation [X]
- Server progress backup system [X]
- Server system [Started...]
- Client system [Not started]
- Rendering system [Almost done]
- Basic explanation on the rendermax webpage [Not done]
- Download link for the client on the rendermax page [Not done]

I should be able to have a working test version by wednesday. I will use my 3 computers, and contact a few friends (And perhaps Hyperion, if he's available :D), so that we can do some testing. This is important, because if the system ends up not working properly, and we need to restart processing from the beggining, it would be quite annoying. I still want to have a usable version by next weekend.

Right now, I plan to have a system where the client query the server for work units, and the server sends individual tasks that take about one minute to complete each and take about 1.5 KB to upload to the server. This means the upload bandwidth will be of about 90 KB per hour, per client... Allowing my server to support over 10000 clients if required :D I think the biggest bandwidth hug will be the webpage where we display the progress, which will eat a good part of my upload bandwidth. This is why I plan to resample the 1600x1200 TGA rendering into a 800x600 PNG, for display purpose. Every 10 minutes, the server will update the image on the website, and will backup its current rendering state. This means if the server ever crashed, it shouldn't be a problem, as the processing could be restarted from the last backup.

The client will not support multiple processors, but if you have more than one, you could simply run multiple instances of the client, and your OS should be able to take advantage of the different processors :)

When the rendering is done (read, noiseless), I will make the full 1600x1200 render available, for use as a wallpaper or poster (Well, I sure will use this as a wallpaper!).
 
Hurry, because I am leaving for three week on Thursday and I will not have any access to this computer!
 
nweibley said:
Hurry, because I am leaving for three week on Thursday and I will not have any access to this computer!

There is a good possibility that I will have a working version tonight, but I don't know if it will be fully ready ;) It might be... Depends how long it takes me to fix a very annoying bug with my network code. One thing is for sure, I must make the client crash proof and able to recover from server errors (ie: auto connection retry), because If you were to leave for 3 weeks, it could certainly be a good thing ;)

Now, for the explanation on the website, I propose this (Feel free to point out grammatical mistakes, english is not my main language):

"RenderMax is a distributed rendering system that runs simultaneously on multiple computers over the internet to produce realistic 3D images. The software is designed so that the bandwidth use is kept to a minimum. It should be possible, in theory, for an entire cluster of computers to connect to the system through a 56K dial-up connection with very minimal losses in terms of performance. A simple path tracing rendering technique is used to produce the graphics, but any other technique could easily be adapted to the system.

The image at the top of this page is the result of this rendering work. It is automatically updated every 10 minutes.The more time is dedicated to the rendering process, the better this image will look. Eventually, when the imperfections in the image are no longer visible, a full-size 1600x1200 render will be made available for download, for use as a wallpaper.

If you wish to participate in this effort, simply click on the link below to download the RenderMax client software. The software is packaged in a zip file, which contains the client executable. All you have to do is to start the program and let it connect to the server . Everything is automated."

Updated progress list:
- PNG output [X]
- Image resampling [X]
- Dynamic image generation [X]
- Server progress backup system [X]
- Server system [Started...]
- Client system [Started...]
- Rendering system [X]
- Basic explanation on the rendermax webpage [Started...]
- Download link for the client on the rendermax page [Not done]
 
I fixed that nasty bug in my network code :) The progress is now quite far..

Updated progress list:
- PNG output [X]
- Image resampling [X]
- Dynamic image generation [X]
- Server progress backup system [X]
- Server system [Started...]
- Client system [Started...]
- Rendering system [X]
- Basic explanation on the rendermax webpage [X]
- Download link for the client on the rendermax page [X]
- Update statistics on the rendermax webpage [Not started]

Its motly a matter of setting up the client/server code now. I have already begun performing some tests on the system.
 
TEK NINJA said:
I fixed that nasty bug in my network code :) The progress is now quite far..

Updated progress list:
- PNG output [X]
- Image resampling [X]
- Dynamic image generation [X]
- Server progress backup system [X]
- Server system [Started...]
- Client system [Started...]
- Rendering system [X]
- Basic explanation on the rendermax webpage [X]
- Download link for the client on the rendermax page [X]
- Update statistics on the rendermax webpage [Not started]

Its motly a matter of setting up the client/server code now. I have already begun performing some tests on the system.
ETA? Hurry!!! I'm gone Thursday morning.
 
Well, sorry, but thats not going to be ready by this morning. I was able to do some testing last night, and it was almost functional. Fixed a few more bugs, but the system doesn't yet fully work properly. Like I originally said, I'm aiming to have a version I can release by the end of this weekend, and I think thats a more reasonable delay.

Hopefully by tonight I will have it mostly sorted out, and I can do a small test with some friends... Fix the last details, and the system is going to be ready.
 
I got the system in a workable state tonight :) I began beta testing it with friends. The server updates the picture on the page every 3 minutes at the moment. It doesnt say the right last updated time, nor how many people are connected though. I will add that tommorow. If you want to help me test it, download the client at:

http://www.xgameproject.com/rendermax
 
The system works!

The server runs, the clients can connect and process work units. The image is updated on the webpage at regular intervals. And this morning, I was able to add a "last update on ..." text to the webpage and restart the server without losing the progress. I still need to add a "number of clients" text under that ;) I will do that tonight.

I will be honest though. I still need to do a few things for this to be considered fully working. When the server updates the output, it takes a good 20 seconds. This is enough for the server to get out of sync with all the clients... I will probably need to improve my send queue mechanism on the client side... And perhaps I will need to make the server update the output data in a separate thread. I'm also getting some weird socket bug... And theres a small change I want to make to my simple connection protocol...

Luckily, I should be able to make those changes without losing the progress thats already made on the render. I'm also quite glad the client package is very small.

Did anybody try downloading the client and running it? :)
 
I am running the client, it seems though that it is not set to run at low/idle priority. That is a must for DC clients. They are to run only on spare/unused cycles.
 
rkhands said:
I am running the client, it seems though that it is not set to run at low/idle priority. That is a must for DC clients. They are to run only on spare/unused cycles.

I'm going to have to check into that. I don't know how to change the priority of a process (yet).
 
this looks very interesting. Seems like a fun project to try.


EDIT: forgot... I started running the client on a 2.8 Ghz laptop. I'll leave this running for atleast a week or so.
 
neomage2021 said:
this looks very interesting. Seems like a fun project to try.


EDIT: forgot... I started running the client on a 2.8 Ghz laptop. I'll leave this running for atleast a week or so.

For a week? Very cool, thanks ;) I will update the client and the server tonight to fix the timeout bug, I hope you will be able to update it :D

On a side note, I already started looking at the possibilites to set the process priority to below normal. This should be implemented by tommorow as well.
 
ya I should be able to update it. I said a week because thats how long I will be on vacation and have my laptop with me and running most of the day :D
 
Well this is cool :) Expect an update tonight. There will also be an update on the server to display how many people are connected at a time (which I think will be very cool and encouraging).
 
I'll give ya some time too. As long as in the future you devote some time to FAH if you're not already. Deal?

Looks like it's running pretty solid right now. No more time outs like I experienced last night.

Fold On!
 
The time out problems still isnt fully fixed because that would require an update of the client (which would render it incompatible with the server, which would force everyone to update at the same time)... But in the meantime, I made the server do its update every 10 minutes instead of every 3, which causes a bit less problems. It gets out of sync when it does the backups... Tommorow I might try to make the server do its update in a separate thread, which would eliminate the timeout problem at 90%.
 
Cool, thanks ;)

This is the best time to run my program now, if you have workstations, run it while you sleep ;)
 
i'm running it on my lapper right now, WOW do those WUs go fast! i wish F@H was like that :p

approx. how many WUs are there?
 
There are 30000 work units, but when they are completed, they aren't "done". The more a unit gets rendered, the better the picture looks.

I was very happy to wake up this morning and see that there were no more black bands over the picture. Now the noise is quickly getting eliminated. I can already tell you that the 1600x1200 render looks quite nice :) Much better than any renders I did so far on my only machine...

I also observed that the file size is going as I predicted. The PNG image on the rendermax page was getting bigger and bigger as the black bands were eliminated, but now that the image is starting to be refined, the file is shrinking slowly. This is because noise is not good, compression wise, and there is less and less of it.
 
neomage2021 said:
The image is looking good! :)

Yepper. The bigger noise bands are almost fully eliminated... I can tell you the 1600x1200 render already looks *very* good :)
 
Allright people :) I updated the server. It now updates the output in a separate thread. This should fix the timeout problems for the clients. At least I didn't see a single error in the server screen for the 15 minutes I watched it. This does not require anyone to update its clients at this time.

Thanks to everyone for the help, keep going please :) !
 
is the picture on the welcome screen still being worked? the noise levels are down so far i can't tell if it's being changed or not, and i've 20/13 vision...
 
PPatBoyd said:
is the picture on the welcome screen still being worked? the noise levels are down so far i can't tell if it's being changed or not, and i've 20/13 vision...

You can see the last time it was updated under the picture, so yes, its still being worked ;)

However, it takes time to decrease the noise level. Might take twice the time we already spent to reduce the noise level by half. I will let the system run at least until the end of the week :)

It already works much better with the multithreaded server update.
 
Back
Top