Message boards :
Number crunching :
Lobbying Again for Change to Account Page
Message board moderation
Author | Message |
---|---|
Cruncher-American Send message Joined: 25 Mar 02 Posts: 1513 Credit: 370,893,186 RAC: 340 |
Like many folks here, I occasionally want to see the Pending Credit I have, and I almost never want to see the actual list of pending WUs. But the Account/Preferences page shows something like: Total credit 15,670,448 Recent average credit 37,760.06 SETI@home classic workunits 18,594 SETI@home classic CPU time 103,828 hours Pending credit View Computers on this account View Tasks View And to get the total pending credit, one has to click "view", which causes a database access to get the list, and then uses b/w to send it to me. Why can't the "Pending Credit" item just show the total, just as the lines above it do? And in fact, if i really want to see the Pendings one-by-one, I can use the Tasks "view" to get to all my Pending WUs anyway. Any objections and/or support out there? Bueller? |
xx Send message Joined: 23 May 99 Posts: 166 Credit: 3,450,910 RAC: 0 |
Sounds reasonable to me. It's annoying to have to scroll all the way down to the bottom of that list just to see the number, which is really all I wanted to see anyway. |
Frizz Send message Joined: 17 May 99 Posts: 271 Credit: 5,852,934 RAC: 0 |
+1 |
Lint trap Send message Joined: 30 May 03 Posts: 871 Credit: 28,092,319 RAC: 0 |
ISTM that db accesses are required to get a total. So, if there was a sum displayed by default all pending wu's would be counted every time someone loaded their account page. Not a good thing. IF the db was keepig a running total that was updated only when new credit was pending or pending was finally granted, then a dynamic display would be feasible. BUT, if anything happened to wipe out multiple users data, that could be disastrous as the db stresses to recalculate all the totals. And the extra workload during high client access periods, after an outage for instance, would be an additional strain. Until db accesses become a "no prob-lem-o", maybe it should stay as it is... Martin [slight edit] |
Richard Haselgrove Send message Joined: 4 Jul 99 Posts: 14655 Credit: 200,643,578 RAC: 874 |
ISTM that db accesses are required to get a total..... That does seem to be the way it's written. Looking at http://boinc.berkeley.edu/trac/browser/trunk/boinc/html/user/pending.php, the key lines are: 45 $results = BoincResult::enum("userid=$user->id AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0"); 46 foreach($results as $result) { 47 echo "<result>\n"; 48 echo " <resultid>".$result->id."</resultid>\n"; 49 echo " <workunitid>".$result->workunitid."</workunitid>\n"; 50 echo " <hostid>".$result->hostid."</hostid>\n"; 51 echo " <claimed_credit>".$result->claimed_credit."</claimed_credit>\n"; 52 echo " <received_time>".$result->received_time."</received_time>\n"; 53 echo "</result>\n"; 54 $sum += $result->claimed_credit; 55 } So yes, not only is each pending record retrieved from the database, but the total is accumulated while the list is stepped through and printed. The server doesn't know the total until the end of the page is reached. An alternative would be to leave the link on the account page as it is (so no DB access is triggered), but rewrite pending.php so that when the page is first accessed, the first thing the user sees is the total figure, with a "show details" button/link/expand to invoke the current full list. It should be easy to write an eqivalent of line 45, returning the sum directly using SQL functions - that should be a much 'lighter' query than the enum, and save on the server memory requirement of the $results vector [which might have a bearing on the Wondering when my pending credit page will fail....... question]. Anyone here got good enough PHP skills to write a patch? (I did an evening class in PHP once, but I think some practical experience would be advisable before submission.....) |
Cruncher-American Send message Joined: 25 Mar 02 Posts: 1513 Credit: 370,893,186 RAC: 340 |
ISTM that db accesses are required to get a total. So, if there was a sum displayed by default all pending wu's would be counted every time someone loaded their account page. Not a good thing. But the total could be got in the same query that gets the other totals as shown. Trust me, I've written lots of SQL queries; the diff between SELECT SUM(a), SUM(b), SUM(c) WHERE... and SELECT SUM(a), SUM(b), SUM(c), SUM (d) WHERE... isn't much. |
Tim Norton Send message Joined: 2 Jun 99 Posts: 835 Credit: 33,540,164 RAC: 0 |
its simpler than that just a running total that gets updated at the same time as your RAC is updated - as the numbers are increased or decreased as new results are validated - much lower overhead than pulling back thousands of rows of data eg. xxx tasks and yyy total potential credit is all most people want - me included wow beaten to the punch twice! - lol Tim |
Lint trap Send message Joined: 30 May 03 Posts: 871 Credit: 28,092,319 RAC: 0 |
An alternative would be to leave the link on the account page as it is (so no DB access is triggered), but rewrite pending.php so that when the page is first accessed, the first thing the user sees is the total figure, with a "show details" button/link/expand to invoke the current full list. Could the total figure be shown on the account page (after the link is clicked)? As jravin pointed out pending details can be seen in the tasks pages. That may save more bw by not loading a "pending" page/s at all. Martin |
theCase Send message Joined: 25 May 99 Posts: 22 Credit: 2,416,299 RAC: 3 |
I'd think it's best left alone. Scrolling down to the bottom of the page isn't that hard. Heck with all the bitching going on about server outage, no W/U's on week-ends, ghosts, etc. I'd think making a change to a functioning screen thats been like this for YEARS is a low priority. |
-BeNt- Send message Joined: 17 Oct 99 Posts: 1234 Credit: 10,116,112 RAC: 0 |
Is it really that big of a deal to click a link? While some users the sql query to gather a sum result isn't a huge issue as they don't have that many result to sum up, some users have MANY more than most. Once you start compounding a lot of people per minute / hour/ or whatever it starts overloading the database. Or could. OR may not really now. Personally I would love my result to be displayed underneath there along with how many unit I have pending shown something like 76,000(470) or something like that. But they have their reason and it could be changed later depending on the over all load I suppose. Because after all anyone who is actually viewing those pages a good bit are clicking that link to begin with! Traveling through space at ~67,000mph! |
bj Send message Joined: 11 Oct 00 Posts: 163 Credit: 50,429,507 RAC: 0 |
Hit the end key on the keyboard. Been doing that for years. bj |
kittyman Send message Joined: 9 Jul 00 Posts: 51469 Credit: 1,018,363,574 RAC: 1,004 |
I agree with the original suggestion that if a pending total could be diplayed without the need for database intensive searches every time a user simply wants to know their pending, it would be a very good thing. As others have noted, most of the time the only thing of interest is the actual pending total, not the individual WUs that are pending. I may be oversimplifying things, but I don't see how that could not be kept and updated the same way that one's total credit and RAC is on the user's account page. I am sure it would involve rewriting code, and is surely not a top priority... But I see no reason that the pending total could not be kept updated and displayed on the account page just as total credit is right now. "Freedom is just Chaos, with better lighting." Alan Dean Foster |
Cruncher-American Send message Joined: 25 Mar 02 Posts: 1513 Credit: 370,893,186 RAC: 340 |
Hit the end key on the keyboard. Yup, but that's not the issue. The main issues are preventing a) sucking all the rows for pending WUs out of the db and then b) transmitting them to the user, both of which are superfluous almost all the time, and use lots of resources. And, as noted above, you can get a list of your pending WUs through the Tasks button anyway, so the current Pending button is superfluous. |
kittyman Send message Joined: 9 Jul 00 Posts: 51469 Credit: 1,018,363,574 RAC: 1,004 |
Except viewing one's pending tasks with the tasks button does not give you the total pending credits. "Freedom is just Chaos, with better lighting." Alan Dean Foster |
Cruncher-American Send message Joined: 25 Mar 02 Posts: 1513 Credit: 370,893,186 RAC: 340 |
Is it really that big of a deal to click a link? While some users the sql query to gather a sum result isn't a huge issue as they don't have that many result to sum up, some users have MANY more than most. Once you start compounding a lot of people per minute / hour/ or whatever it starts overloading the database. Or could. OR may not really now. Personally I would love my result to be displayed underneath there along with how many unit I have pending shown something like 76,000(470) or something like that. But they have their reason and it could be changed later depending on the over all load I suppose. Because after all anyone who is actually viewing those pages a good bit are clicking that link to begin with! But getting those Pending WU rows as a separate query IS a problem for the DB. As I noted above, adding "SUM(Pending WU.credit)" (or whatever) to the query that generates the other totals on the Account page doesn't use a lot of extra resources (since all the WUs are scanned anyway to produce the other totals therein). That was my original point. Mark: Except viewing one's pending tasks with the tasks button does not give you the total pending credits. EXACTLY! |
Uli Send message Joined: 6 Feb 00 Posts: 10923 Credit: 5,996,015 RAC: 1 |
I agree with the original suggestion that if a pending total could be diplayed without the need for database intensive searches every time a user simply wants to know their pending, it would be a very good thing. That would be nice Mark and a good idea as well. Pluto will always be a planet to me. Seti Ambassador Not to late to order an Anni Shirt |
-BeNt- Send message Joined: 17 Oct 99 Posts: 1234 Credit: 10,116,112 RAC: 0 |
I was agreeing with you?! Traveling through space at ~67,000mph! |
Cruncher-American Send message Joined: 25 Mar 02 Posts: 1513 Credit: 370,893,186 RAC: 340 |
My bad! It's too late! And on Xmas, too! Merry Christmas to all, and to all, a Good Night! |
Helli_retiered Send message Joined: 15 Dec 99 Posts: 707 Credit: 108,785,585 RAC: 0 |
That would be enough for me. I don't access the Pending Credits Page that much... Helli A loooong time ago: First Credits after SETI@home Restart |
W-K 666 Send message Joined: 18 May 99 Posts: 19129 Credit: 40,757,560 RAC: 67 |
I think the suggestion is desirable but probably impractical. It would have to be done for every owners account and be refreshed; a) every time a task is reported and goes into the pendings tray and b) for every task reported by a wingman and then validated and departs the pendings tray. This would almost certainly be a large server load, for one entry on the accounts page that is only looked at by at most few thousand owners per day. |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.