| Index | Recent Threads | Unanswered Threads | Who's Active | Guidelines | Search |
| World Community Grid Forums
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 65
|
|
| Author |
|
|
SekeRob
Master Cruncher Joined: Jan 7, 2013 Post Count: 2741 Status: Offline |
Using the API extensively to analyze results and how much there's in progress on a big account. This account has round about 1500 'In Progress', yet when the filtered pull is run it says there are over 5000. Not only that, though it's specified to fetch 250 IP records per query, only 25 come across, and the XML actually says so
----------------------------------------correct per last good run Recs Fetched Offsetwrong, repeatedly Recs Fetched OffsetThis started happening on a small account last night, but now on the big one too, multiple runs later. Don't understand the odd increment from 1532 to 5264 IP records and why the parm is sent with 250, but only 25 are sent per request, with leads to 5264/25 = 526 requests ** instead of 1532 / 250 = 7 (roundup), were in not that only 56 query maps were created... for 14000 IP records (happens when the real short OET/Zika come out the feeder in large numbers)... in short this is hammering the BOINC server, where it could be done in 7 requests., but max only 56*25 =1400 come across. ** The number of passes needed is determined after the first fetch from the records and received field. The url transmitted is ttps://secure.worldcommunitygrid.org/api/members/SekeRob/results?code=accountkeycode&format=xml&limit=250&offset=0&ServerState=4&SortBy=SentTime accountkeycode is the 32 ex string. The front h from https removed else the post does not show the full url line. [Edit 2 times, last edit by SekeRob* at Oct 4, 2016 10:11:26 AM] |
||
|
|
SekeRob
Master Cruncher Joined: Jan 7, 2013 Post Count: 2741 Status: Offline |
hmmm, 25 is the default and now looking closer, though the subsequent requests have an incremental offset included, it's the same top 25 IP records time and again, 526 times, where the url line on the 56th map clearly asks for an offset of 13750, after which the rest goes into the void
----------------------------------------ttps://secure.worldcommunitygrid.org/api/members/deltavee/results?code=accountkeycode=250&offset=13750&ServerState=4&SortBy=SentTime [Edit 1 times, last edit by SekeRob* at Oct 4, 2016 10:51:51 AM] |
||
|
|
SekeRob
Master Cruncher Joined: Jan 7, 2013 Post Count: 2741 Status: Offline |
Same thing this morning, the weirdest part, ONLY when ServerState=4 (In Progress) is done, 5, returned results is and remains to be fine. The inconsistence is the defaulting to the top 25, which is earlier specified in the url, before the ServerState, yet the 25 that come are In Progress and sorted proper newest/oldest on SentTime (hmmm is that a Result Status page default?)... why is the request for the limit and offset parms ignored by the server?
Results url: ttps://secure.worldcommunitygrid.org/api/members/SekeRob/results?code=accountkeycode&format=xml&limit=250&offset=250&ServerState=5&SortBy=ReceivedTime InProgress url: ttps://secure.worldcommunitygrid.org/api/members/SekeRob/results?code=accountkeycode&format=xml&limit=250&offset=250&ServerState=4&SortBy=SentTime |
||
|
|
SekeRob
Master Cruncher Joined: Jan 7, 2013 Post Count: 2741 Status: Offline |
Specifying 250 records (per API max), and doing some diagnostics, getting, per MSDN
Return Value The url composit is right, the sort order is right, the server state filter is right, both items at end of the url, yet interspersed one or the other fetch only contains 25 records, and then always the top 25, not those as requested by the offset. Doing some benchmarking, the average fetch run of 15*250 results &ServerState=5, run in 17 seconds, best in 14 seconds, which is great meaning 250 records are read in, transmitted and imported in under 1 second, successively, but the momentary average fetch time of 11 pages for serverstate=4, In Progress, is 22 seconds.... identical script, same procedure call, with just a different url suffix &ServerState=4&SortBy=SentTime instead of &ServerState=5&SortBy=ReceivedTime Something is getting truncated maybe, so looked at string lengths of the urls... 167 up to 10000 records, then 168 where MS Office insider reveals From Joel Spolsky (who led much of the early Excel development): "Excel uses Pascal strings internally which is why strings in many places in Excel are limited to 255 bytes, and it's also one reason Excel is blazingly fast." ... though as others have stated, VBA has no such limit. my emphasesSo now I do a scripted direct inject of the url instead of using databinding.refresh, which is awfully nicer too in code... reuse the previously formatted connect queries, and build in a dowhile loop, because it (speculative), something is not keeping up from my mountain range to into the WCG hosted data center on the Toronto flats, randomly or for all serially sent 11 requests, to repeat for In Progress only... very very weird. |
||
|
|
knreed
Former World Community Grid Tech Joined: Nov 8, 2004 Post Count: 4504 Status: Offline Project Badges:
|
Sekerob,
----------------------------------------I'm testing using wget and I'm getting consistently correct data. I also dug through the code and it all goes through the same code so changing the sort order or the server state parameter shouldn't yield any difference for offset/limit parameters. The only possible issue that I might have found was that when the SentTime or ReceivedTime is identical between two results, the ordering of those matching results isn't assured (i.e. there is not a second sort parameter). I see from the logs that you are online testing now. Can you provide a detailed, repeatable example of what is wrong? One other note. If you need to save a few characters in the URL you can use https://www.worldcommunitygrid.org rather than https://secure.worldcommunitygrid.org. I wasn't sure in the quote above if you were thinking that you were hitting a limit to URL length in excel. [Edit 1 times, last edit by knreed at Oct 6, 2016 2:31:50 PM] |
||
|
|
SekeRob
Master Cruncher Joined: Jan 7, 2013 Post Count: 2741 Status: Offline |
Thnks for investigating. Yes, thought there was a limit, but ServerState 4 or Serverstate 5, when using SorBy=ReceivedTime or SortBy=SentTime is in fact 4 char shorter, the various researches hitting on that 255 string length history, to which we're not getting even close... crtrl characters tend to be making strings longer, but there are only few.
Unfortunately, it's not repeatable in a forced way, the received data is just that, 25 records off the top. One of the test passes today had the seventh 250 offset return going bad, so from &offset=1500. The symptom is that the return xml shows there was no filtering, so e.g 5300 records, 25 fetched instead of an expected 1600 with 250 fetched. It's almost time off the day that matters... the schedule starts running Results and In Progress fetches at 00:06:15 UTC (when I'm shuteye), to get a snapshot through that 6 minute spilltime, then when in the morning stepping through fetching My Contribution > Archive prior period credited results, fetching device statistics and finally a first pass of new stats period results & in progress to peruse, it's then things fall over, and remain so, so leave it alone, and in afternoon things seem to have returned to normality, bar the occasional 250 set turning 25, without the serverstate filtering i.e the top selection of all that's on the Result Status pages. The noted coding change, direct injecting with .XmlMaps("InProgress_Map" & I).Import url:=rURL , where rURL is the preformatted url string and I is the page counter, so a page var value of 6 becomes 1500, the limit=250 is hardcoded. When running the script and outputting rURL to the 'immediate' window all list proper, incrementing the offset correctly with each pass, looking like this, username and account key redacted: ttps://secure.worldcommunitygrid.org/api/members/username/results?code=accountkey&format=xml&limit=250&offset=0&ServerState=4&SortBy=SentTime ttps://secure.worldcommunitygrid.org/api/members/username/results?code=accountkey&format=xml&limit=250&offset=250&ServerState=4&SortBy=SentTime ttps://secure.worldcommunitygrid.org/api/members/username/results?code=accountkey&format=xml&limit=250&offset=500&ServerState=4&SortBy=SentTime ttps://secure.worldcommunitygrid.org/api/members/username/results?code=accountkey&format=xml&limit=250&offset=750&ServerState=4&SortBy=SentTime ttps://secure.worldcommunitygrid.org/api/members/username/results?code=accountkey&format=xml&limit=250&offset=1000&ServerState=4&SortBy=SentTime front h removed to get the strings to show. Cant's see anything malformed being sent. The urls are actually generated in a For Next loop, just inserting the incremental offset value. The big question being, what goes across the Transatlantic trunk cable and what arrives at your end. The return feedback I get is xlXmlImportSuccess, i.e. sent a url, received an xml response, properly formatted. If I malform the url, the script hangs and a screen pops up to say "can't parse", suspecting this is some kind of feedback from the server to my client. Since you can see the logs of my tests, can you see the actual urls that are read in? WGet utilization within Office, talking to the w3w via IE is next on my list of things to learn (Office does not speak with other browser engines). A first trial actually allowed me to open a IE frame inside an Excel sheet... live browsing, picking and choosing what's wanted, but that's by hand... now the scripting of same to be mastered... macro recording ends right at the doorstep of the IE shell :( FTM, the new code works faster for In Progress (In Progress used to always be faster, but since this it's slower to get the pages filled... a sign something in your server room is/was working harder at filling the requests for the ServerState=4 |
||
|
|
SekeRob
Master Cruncher Joined: Jan 7, 2013 Post Count: 2741 Status: Offline |
The lost bits have been returned from the space between spaces, so it remains speculative what and why this got going bad intermittently. Nothing went missing during the nightly and 2 morning update, signified by a large green tick-mark image on the display, i.e. using import instead of .databind.resfresh seems to have helped to PTF the issue, and at lightning speed at that, reducing chance of shifting Result Status records between page 1 and page nn whilst your validator keeps working and migrating.
For the record, the tool retains a snapshot of the raw results list for the last 2 period end passes. This showed yesterday a mid-period 'Too Many Errors' HSTb result which got credited and soon after removed. The automaton recognized the exact differential and pinpointed the result by it's runtime of 4:46:08 and knowing HST project sheet had the differential. Your duplicate Sent/Received datestamp sort anomaly might put the issue permanently to bed if you decide on that second sort key. thx for your time. |
||
|
|
knreed
Former World Community Grid Tech Joined: Nov 8, 2004 Post Count: 4504 Status: Offline Project Badges:
|
Since you can see the logs of my tests, can you see the actual urls that are read in? Yes - and they are just like the above that you indicate so there is no truncation occurring. |
||
|
|
knreed
Former World Community Grid Tech Joined: Nov 8, 2004 Post Count: 4504 Status: Offline Project Badges:
|
Your duplicate Sent/Received datestamp sort anomaly might put the issue permanently to bed if you decide on that second sort key. We will make a change so that there is a secondary sort (probably on workunit name) so that the sort is always predictable. |
||
|
|
SekeRob
Master Cruncher Joined: Jan 7, 2013 Post Count: 2741 Status: Offline |
Great. From my end, (to keep it spatial), no new interdimentional vortex has opened up since last I wrote.... highly stable, except for the occasional missing result due the 'liveliness' of the Result Status page transacting, but think I've got a strategy for this. Starting with asking 250, offset=0, the next pass will ask for 250 again, but from offset=240, the next 250 from offset 480 and so on. This will lead to duplicates in the initial cache, but that was already handled... the first one with the same result name is taken, and any additional marked double. Since the sort is received-time, descending, putting the newest to top, might want to pull the top 250 last, since these would catch any that changed while working on page 2 to nn sequentially, though shooting the requests in parallel has crossed my mind... probably will choke something.
Typically the tipping point seems to lie around 1000 results / 12 hour stats cycle. Less and hardly see any missing, above and fetching is not fast enough. Fact is, if a result is reported/validated (that cycle takes between 5-10 seconds) while churning through 15-20 at extremes 60-70 pages * 250 when there's days of very shorts, that new record goes to top, so by page 10 or whatever, a result caught on page 9 is again caught on page 10, but the doubles check handles that. Opposed if a PV result is on page 10 (record 2251-2500) and get's validated while working on page 9, it does not get caught in any state, i.e. the snapshot is incomplete... not on results, not on in progress. The period end cycle during archiving actually does a new pass and catches any that were missed, a post-archive-compare-to-archive routine is called that looks at timestamps and identifies these. Sounds all complicated, but the object is to get a result archive that adds up per period to the exact total of the statistics history. For now, the reading in of the 250 sets and cycling through the for-next slowness is the root cause. It seems to work well though for a single account up to 17500 results... few that have this, and few in this realm could probably be concerned. ![]() |
||
|
|
|