Suggestion: download new WU before current one finishes

Moderators: Site Moderators, FAHC Science Team

Rum@NoV
Posts: 133
Joined: Tue Dec 25, 2007 1:29 pm
Hardware configuration: Orion (SMP):
---------------
CPU: Intel Core i7-2600
Memory: 8192 MBytes PC12800 DDR3 SDRAM
Graphics: Sapphire RADEON HD 5850, 1024 MB GDDR5 SDRAM
OS: Microsoft Windows 7 Home Premium (x64) Build 7601

Deepcore_II (SMP):
----------------------
CPU: Intel Core 2 Quad Q9650
Memory: 4096 MBytes PC6400 DDR2-SDRAM
OS: Ubuntu Server 10.04

Nostromo (SMP+GPU):
--------------------------
CPU: Intel Core 2 Duo E8500
Memory: 4096 MBytes PC6400 DDR2-SDRAM
Graphics: EVGA e-GeForce 8800 GT, 512 MB GDDR3 SDRAM
OS: Microsoft Windows 7 Home Premium (x64) Build 7601
Location: Flanders, Belgium

Suggestion: download new WU before current one finishes

Post by Rum@NoV »

I've did a little search on this subject, but I don't think it has been asked before.

My suggestion to improve the fah-client: download a new WU before the current one finishes.

Why? Uploading a SMP WU can take some time, depending on the upload speed of your internet connection. During the upload, the CPU/GPU is idling (which is a thing every folder hates I guess ;) )

Some numbers (based on 24h/24h folding):
- A completed P2671 mesures 49203991 bytes (= 48050 kilobyte or 46,92 megabyte)
- Upload time on my connection (20Mbit down / 1Mbit up) = 48050 / 128 kilobyte (128 = optimal situation, my average upload speed is 106 kilobyte!) = 375,39 seconds (6 minutes 15 seconds) upload time.
- If a CPU completes two of these WU/day the upload and idle time would be at least 12 minutes 30 a day. Per year the upload and thus idle time would be 74 hours 31 minutes and 15 seconds, which is more then 3 days!

To optimize the efficiency (more work completed with the same hardware!!) of the client I suggest the client starts downloading a new WU, when for example the current WU is completed for 95%. The client then continues working and uploads the finished WU in the same time.

What do you guys/girls think, is this possible? Is there a chance this enhancement might be included in the next client update?
Image
Zagen30
Posts: 823
Joined: Tue Mar 25, 2008 12:45 am
Hardware configuration: Core i7 3770K @3.5 GHz (not folding), 8 GB DDR3 @2133 MHz, 2xGTX 780 @1215 MHz, Windows 7 Pro 64-bit running 7.3.6 w/ 1xSMP, 2xGPU

4P E5-4650 @3.1 GHz, 64 GB DDR3 @1333MHz, Ubuntu Desktop 13.10 64-bit

Re: Suggestion: download new WU before current one finishes

Post by Zagen30 »

Maybe there hasn't been much discussion of that topic on this edition of the forums, but I know for a fact that back in the good old days (way before I started, mind you) there were lengthy debates over the subject of queueing work units. The answer has always been no, and it's not going to change. If we get anything resembling queueing, it'd be downloading a new WU when the client goes to upload a completed WU, but I'm not sure if that's even being considered. The Pande Group doesn't want to risk losing multiple WUs to a computer that suddenly stops folding for whatever reason, as losing one sets back the project a fair amount as it is.
Image
toTOW
Site Moderator
Posts: 6359
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Suggestion: download new WU before current one finishes

Post by toTOW »

This has been suggested already, and explained why that will probably never happen : search on the forum similar topics.
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
Pick2
Posts: 85
Joined: Fri Feb 13, 2009 12:38 pm
Hardware configuration: Linux & CPUs
Location: USA

Re: Suggestion: download new WU before current one finishes

Post by Pick2 »

The layman's version is:
Each finished WU generates the next WU in the chain. If everyone downloaded a new WU before finishing the current WU , We would need twice as many WU chains available. Lots of people would have to wait for their next WU , negating any gains. Doubling the number of WU chains running would make each series take twice as long to complete.
That's My story , and I'm not going to argue the point. :)
codysluder
Posts: 1024
Joined: Sun Dec 02, 2007 12:43 pm

Re: Suggestion: download new WU before current one finishes

Post by codysluder »

Pick2 wrote:. . .
That's My story , and I'm not going to argue the point. :)
An excellent summary.

From the PG perspective, your suggestion would SLOW THINGS DOWN. They count the time from the moment a WU is downloaded until it is uploaded, and you're extending that time.

Take a look at the experemental bonus program that's currently being tested. If you were participating in that program, your suggestion would reduce the bonus, which is another way that the Pande Group is telling us that in many cases the scientific value of our contributions may not maximized simply by maximizing CPU use.
jrweiss
Posts: 704
Joined: Tue Dec 04, 2007 6:56 am
Hardware configuration: Ryzen 7 5700G, 22.40.46 VGA driver; 32GB G-Skill Trident DDR4-3200; Samsung 860EVO 1TB Boot SSD; VelociRaptor 1TB; MSI GTX 1050ti, 551.23 studio driver; BeQuiet FM 550 PSU; Lian Li PC-9F; Win11Pro-64, F@H 8.3.5.

[Suspended] Ryzen 7 3700X, MSI X570MPG, 32GB G-Skill Trident Z DDR4-3600; Corsair MP600 M.2 PCIe Gen4 Boot, Samsung 840EVO-250 SSDs; VelociRaptor 1TB, Raptor 150; MSI GTX 1050ti, 526.98 driver; Kingwin Stryker 500 PSU; Lian Li PC-K7B. Win10Pro-64, F@H 8.3.5.
Location: @Home
Contact:

Re: Suggestion: download new WU before current one finishes

Post by jrweiss »

There is merit in one piece of Rum's suggestion: When the FINISHED_UNIT message is sent and the client starts the upload/download process, the client could download the new unit BEFORE uploading the finished unit. Delays waiting for the next WU will be reduced, and the new WU can be crunching away while the client waits for the results server to respond.

In many cases a new WU is downloaded while the client is waiting for the upload to be accepted, so the concept works now. The only change would be to make it a default behavior instead of a contingency behavior.
Ryzen 7 5700G, 22.40.46 VGA driver; MSI GTX 1050ti, 551.23 studio driver
Ryzen 7 3700X; MSI GTX 1050ti, 551.23 studio driver [Suspended]
Rum@NoV
Posts: 133
Joined: Tue Dec 25, 2007 1:29 pm
Hardware configuration: Orion (SMP):
---------------
CPU: Intel Core i7-2600
Memory: 8192 MBytes PC12800 DDR3 SDRAM
Graphics: Sapphire RADEON HD 5850, 1024 MB GDDR5 SDRAM
OS: Microsoft Windows 7 Home Premium (x64) Build 7601

Deepcore_II (SMP):
----------------------
CPU: Intel Core 2 Quad Q9650
Memory: 4096 MBytes PC6400 DDR2-SDRAM
OS: Ubuntu Server 10.04

Nostromo (SMP+GPU):
--------------------------
CPU: Intel Core 2 Duo E8500
Memory: 4096 MBytes PC6400 DDR2-SDRAM
Graphics: EVGA e-GeForce 8800 GT, 512 MB GDDR3 SDRAM
OS: Microsoft Windows 7 Home Premium (x64) Build 7601
Location: Flanders, Belgium

Re: Suggestion: download new WU before current one finishes

Post by Rum@NoV »

Thanks for the replies.

I understand that it is important for the PG to receive the results asap and my suggestion would slow things down if one isn't folding 24/24.

But what jrweiss suggests isn't that possible? Instead of uploading the finished WU, the client downloads a new WU first (after receiving the FINISHED_UNIT message) and then immediately uploads the finished result. Downloading a new WU generally goes a lot faster then uploading one so we could win a lot of time and PG will have their results as fast as they do now.
Image
GTron
Posts: 53
Joined: Wed Dec 05, 2007 3:47 pm
Location: Denver area, Colorado

Re: Suggestion: download new WU before current one finishes

Post by GTron »

Okay, maybe I spent WAY too much time staring at a tiny datascope screen in a previous decade. However:

We are talking about SMP (as in symmetric MULTIprocessing) clients communicating with the Stanford servers over what is normally a FULL DUPLEX comm link. Why should either the upload or download need to be sequenced after the other? They could happen CONCURRENTLY. Provided, of course, the clients and servers were coded accordingly and that is the real issue. While I would like to see that feature in a future version of the software, it will not stop me from folding now.

Just my $.02

Greg, Folding On
PennyPincherP
Posts: 15
Joined: Wed Nov 05, 2008 11:56 pm
Location: Corona, CA

Re: Suggestion: download new WU before current one finishes

Post by PennyPincherP »

I have 256Kbs upload speed on DSL. It takes 45 mins to upload -bigadv results according to my logs. Download speed is 3Mbps and takes 2 mins 15secs. According to the logs, nothing is done in parallel. That's fine for the uniprocessor clients but isn't very efficient for smp, especially for huge WU's. Assuming the upload could be done in parallel with the core, downloading the next WU and reinitiating the core before the upload makes sense. The upload process would of course would need a higher priority than the core. Error handling and queue maintenance would be a lot trickier as well. A 2 minute delay in getting results after 3 days is acceptable if it means the getting 45 more minutes of computation.
Last edited by PennyPincherP on Sat Sep 26, 2009 6:03 pm, edited 1 time in total.
whynot
Posts: 91
Joined: Wed Mar 26, 2008 9:02 pm
Location: Kyiv, Ukraine

Re: Suggestion: download new WU before current one finishes

Post by whynot »

As you already know tear has some success with this issue. While I highly appreciate his success, I would somewhat argue with his methodology. However since I don't have that issue (my upload is ~x100KB each, sometime less) I won't comment.
--
I'm counting for science.
Points just make me sick.
7im
Posts: 10179
Joined: Thu Nov 29, 2007 4:30 pm
Hardware configuration: Intel i7-4770K @ 4.5 GHz, 16 GB DDR3-2133 Corsair Vengence (black/red), EVGA GTX 760 @ 1200 MHz, on an Asus Maximus VI Hero MB (black/red), in a blacked out Antec P280 Tower, with a Xigmatek Night Hawk (black) HSF, Seasonic 760w Platinum (black case, sleeves, wires), 4 SilenX 120mm Case fans with silicon fan gaskets and silicon mounts (all black), a 512GB Samsung SSD (black), and a 2TB Black Western Digital HD (silver/black).
Location: Arizona
Contact:

Re: Suggestion: download new WU before current one finishes

Post by 7im »

I read in vijay's blog where they just got $100K for system upgrades, and should help with some issues. But at times, in the past, the number of connections to Stanford was limited, and servers were over loaded. When that happens, they would not be able to handle twice the connections to do simultaneous uploads and downloads. And when a choice needs to be made, they'd prefer to get the completed data first.

I'm not saying that's right or wrong, just how it is... or was back in the day of dialup, when uploads and downloads were almost the same speed. And a lot of what we would still like changed today (perpetual suggestions like this) are legacy hold-overs from days gone by.

This type of concurrent uploads/downloads would take a serious rewrite of the client and server codes. And major over-hauls run the risk of being very disruptive to the project. For example, look how quickly people post when a single server goes down, or a single work unit fails to upload. Now imagine if a client / server rewrite had a small glitch that prevented 100,000 users from getting new work for a few days until it was fixed. Not pretty (examples of this have been seen in the GPU and PS3 clients in the past, so not unheard of...).

I'm not saying they shouldn't improve the process, but I am saying it's a very risky change for not much reward. Some would say the available development time they have is better spent on making a better SMP(2) client for Windows, and optimizing the GPU clients for the latest hardware. And then work in changes like this gradually over time. 8-)
How to provide enough information to get helpful support
Tell me and I forget. Teach me and I remember. Involve me and I learn.
k1wi
Posts: 909
Joined: Tue Sep 22, 2009 10:48 pm

Re: Suggestion: download new WU before current one finishes

Post by k1wi »

My thinking is along the same lines as Penny Pincher;

There are two problems,
1. limited concurrent connections to the server,
2. Asymmetric connections DL/UL ~10:1, exacerbated by download files ~4MB and upload ~25MB

Why not just change the code to swap when the download and upload occurs and end up with the download occurring immediately before the upload begins? That way the same number of connections are being made, and there is less than a ~3 minute difference in reporting back, but the donor's CPU is being utilised better?
Image
PennyPincherP
Posts: 15
Joined: Wed Nov 05, 2008 11:56 pm
Location: Corona, CA

Re: Suggestion: download new WU before current one finishes

Post by PennyPincherP »

If concurrent connections is the problem. Maybe Stanford could look into considering offsite hosting of their result servers where they have higher capacity. The aggregated results could then can be uploaded with high speed bursts back to Stanford as appropriate. Maybe you could get some site to donate this service or do it at nominal cost. If it's a question of hardware, I have at least a dozen 8 core boxes that I'm not using that I could donate.
7im
Posts: 10179
Joined: Thu Nov 29, 2007 4:30 pm
Hardware configuration: Intel i7-4770K @ 4.5 GHz, 16 GB DDR3-2133 Corsair Vengence (black/red), EVGA GTX 760 @ 1200 MHz, on an Asus Maximus VI Hero MB (black/red), in a blacked out Antec P280 Tower, with a Xigmatek Night Hawk (black) HSF, Seasonic 760w Platinum (black case, sleeves, wires), 4 SilenX 120mm Case fans with silicon fan gaskets and silicon mounts (all black), a 512GB Samsung SSD (black), and a 2TB Black Western Digital HD (silver/black).
Location: Arizona
Contact:

Re: Suggestion: download new WU before current one finishes

Post by 7im »

Concurrency would have been a problem in the past, but I don't know what the current state is after all the upgrades they've done, and are still doing.

As for just swapping the order of the download/upload, that goes back to what I said about making changes. No change is a small change where reprogramming 400,000 clients, and 25+ servers is concerned.
How to provide enough information to get helpful support
Tell me and I forget. Teach me and I remember. Involve me and I learn.
jrweiss
Posts: 704
Joined: Tue Dec 04, 2007 6:56 am
Hardware configuration: Ryzen 7 5700G, 22.40.46 VGA driver; 32GB G-Skill Trident DDR4-3200; Samsung 860EVO 1TB Boot SSD; VelociRaptor 1TB; MSI GTX 1050ti, 551.23 studio driver; BeQuiet FM 550 PSU; Lian Li PC-9F; Win11Pro-64, F@H 8.3.5.

[Suspended] Ryzen 7 3700X, MSI X570MPG, 32GB G-Skill Trident Z DDR4-3600; Corsair MP600 M.2 PCIe Gen4 Boot, Samsung 840EVO-250 SSDs; VelociRaptor 1TB, Raptor 150; MSI GTX 1050ti, 526.98 driver; Kingwin Stryker 500 PSU; Lian Li PC-K7B. Win10Pro-64, F@H 8.3.5.
Location: @Home
Contact:

Re: Suggestion: download new WU before current one finishes

Post by jrweiss »

7im wrote:As for just swapping the order of the download/upload, that goes back to what I said about making changes. No change is a small change where reprogramming 400,000 clients, and 25+ servers is concerned.
I have to disagree here.

They would only be reprogramming a dozen or so clients, and I suspect the source code logic in that segment of the client is identical for all of them. The number of servers is totally irrelevant. All it takes is to move the initial download connection to just prior to the initial upload connection. All the remaining logic remains intact, including the timing for waits between subsequent attempts of either action.

As it is, an unsuccessful upload attempt can delay the download of the next WU for hours, and the start of the next WU in the server queue is not at all affected by the WU results awaiting upload. We know this because there will eventually be a download attempt even if the upload does not complete.
Ryzen 7 5700G, 22.40.46 VGA driver; MSI GTX 1050ti, 551.23 studio driver
Ryzen 7 3700X; MSI GTX 1050ti, 551.23 studio driver [Suspended]
Post Reply