Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go ยป
No member browsing this thread
Thread Status: Active
Total posts in this thread: 116
Posts: 116   Pages: 12   [ Previous Page | 3 4 5 6 7 8 9 10 11 12 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 16700 times and has 115 replies Next Thread
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

As a closer, added a sort key to DevProf so that the device profile table assumes the same order as the device stats [the one with latest result at top]... seemed Spock logical to do that.

What I am/was contemplating is, if to add the device profile table updating needs to be part of the 12 hourly stats cycle. Right now there's a button on the ribbon to fetch at will, and that will remain, but how often does one change the device > profile association? I never do, each device has it's own profile [and that's more than 4], but maybe others flip it around often. Speak up and motivate... it's something slow to extract from the WCG... good old 20th century scrape, clean off agent images that come across, create/fit in table, extract DeviceId from urls, sort... a simple day in the boiler room so to speak, albeit fully automated but for the period routine inclusion.

ttyl
----------------------------------------
[Edit 1 times, last edit by Former Member at Feb 5, 2017 11:30:56 AM]
[Feb 5, 2017 11:27:13 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

The shear bwilliance, or oops, why did I not think of that before? As the hunting tool archive was ever growing against the large user account, the 'is the result on archive already?' test, now against 625000, became ever slower. Had already determined what the oldest live Result Status page result was so that the archive export could be shrunk periodically, to only leave the newer 'live', else testing if something was already counted could result in, valid > on archive? > if not, count [as the volume is so large, that single pass sequential fetches leads to misses!, not fetched]. The trick was to take the oldest live record ModTime and look up in the sorted archive, what the nearest lesser record was on archive [1x a day], which proofed to be one at 267915 from the top, i.e. when looking for an exact match [on the ResultId field], not parsing 625000 to find a true or false, but 'only' 267915. If the RS pages are just 200-300, it does not really matter... the computer will be fast enough to just needing 10-20 seconds to work through, but when having thousands live, it starts counting and sure enough, last midnight run took 7 minutes to redo, this morning 4... barely time to go and extrude a fresh cup of doppio forte from the coffee machine.

dancing

PS, ModTime cant be used on its own, since the ModTime value has multiple functions, to include that it changes when e.g. the server sets a result ready for deletion [FileDeleteState field changes with it], or an additional wingman returns a result for an already quorum complete task.
[Feb 15, 2017 10:56:18 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

Well, as posted in the 'Something weird with the API' thread, finally made a bubble/binary search/check against the new ResultId field bend to my will and it running in 0.3 seconds for 6000 records looked up against 627K archive results instead of minutes.

Yesterday also toyed with the 'Is this a current period result or not' logic, and made it to just fetch the start time instead of start and end [we know a stats period is 43200 seconds long, so there's no need to fetch both :-). Today the literature revealed that VBA is a bit sloppy with clearing variables whence a procedure has ended, so if there's a function that needs to fetch a sheet value over and over again to, it can actually be kept in memory by declaring it public [noticed this before by accident when dealing with booleans, which confusionly kept returning True, when the default is False, forcing me to set the value back to false again at end of procedure [because it was public as it came out]. So now, with over 75000 results live [a never ending flood of FAHV shorts], used this slop and stored the PeriodStart value in a PrdStart variable, and put a test in the function... If PrdStart is 0 then put PeriodStart sheet value in PrdStart variable.

To think that before yesterday morning, the UDF function would have done sheet value fetching 150,000 times [75000 records times 2 for the start end period values], it now just does it 1 time just for the PeriodStart value only and then just flies away, ludicrous speed, If modtime - PrdStart is > 0 and <= 43200 seconds, then True (the result is for this period).

Adding to this, I've disabled result view filtering to just show all instead of only current period... the real time filtering in the table was just another CPU > GPU time eater continuously testing... has the result to be shown or not. Hardly worth considering when having 100-200-500 results live, but at the said 75000 update time needed piles up.

So much for the simple things that safe a bundle of time.
[Feb 16, 2017 4:19:48 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

The intertubes went thoroughly turt-ois while the nightly result fetch launched and by the anticipated last record 56897 was reached [so it said at start of fetch], another 3200 had been returned, pushing the oldest 3200 off [we can only get 250 at a time] and in there were still a good lot of old results validated. So after hard think [not], added a line to check if the last map had it's full fill 250, yes indeed, the rounded number was 57000, and if so, assume the last map counter needed incrementing, so the next for loop would do an additional pass, and check again. That works great... no more misses at the end, just doubles, because of the live pushing by new results being returned in the mean time.

Whilst at that, as it so happens [quoting Bill again, you know, the adversary of Beatrice Kiddo], had an error catch line as when a map was zero lines returned, it'd throw a fit, and found that listrow.count opposed to databodyrange.rows.count does not, it just reports zero. Out the time eating error if-then trap code went.

Hey, things are 'mazing... 746,000 archived results in the Excel Db, and things still not falling over. Which regular user worries about her/his data not fitting in for the next 12 years ;?

Sun is coming out... we're going out as well.
----------------------------------------
[Edit 1 times, last edit by Former Member at Feb 18, 2017 9:55:20 AM]
[Feb 18, 2017 9:34:26 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

Oh dear, missed one other opportunity to pre-fetch a value to store as a session-constant and reuse it in a custom function. 6 Runs, alternating between with and without the constant and on current 6,500 results and 460,000 archive, exported half last night, a full model calculation rebuild took instead of 194 seconds [high 195, low 193], it takes 130 seconds [high 132, low 127]... ~33% speedup. That promises to be a significant time shaving when having 10s of thousands of shorts again.... considering the longest rebuild at max load of 76,500 results took 49 minutes another big shaving.

Have a nice e-ve-ning
[Feb 20, 2017 8:06:06 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

"To be or not to be" was today's question and for Excel "If > 0 " then it's automatically being, so no need to ask if the condition is true or false... if > 0 and you need to test this then simply stating e.g. If A1 then... is enough. After removing half a dozen of these tests from UDFs and a bunch of formula, the 3 pass 'fetch & calculate' runtime test on 12000 results (serverstate=) went down by another 20%.

(Back to the future is in the crosshairs)

dancing
[Mar 2, 2017 6:49:04 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

Today was cracking the last of the hardest nuts [not required, just a nice challenge], and tried the hardest of the hardest first [since on this all of the rest would be build off]... the question was, how to read in an array without knowing whats in it, read it only once and NOT up to 107500 times, since the content is static for the duration of the stats period, and then find a match and an offset index entry, which led to discovering that VBA allows

Application.WorksheetFunction.Index
WorksheetFunction.Index
Application.Index

All 3 do exactly the same, where the beaute is, that to VBA it does not matter whether the data has to be fetched from the spreadsheet, or whether it's stored in an array, where latter is orders of magnitude faster, still regardless UDFs being single threaded where spreadsheet functions can often use multiple threads (if allowed).

Then, since the array was a mixture of text and datevalues, had to ensure that if it was a date, the number would be returned and not a string of said date, where the novel to me CDate came to the rescue and a simple test if the 3rd pos in the string is a - or not. simply resulted in

If Mid(Matchtest, 3, 1) = "-" then matchtest = CDate(Matchtest)

and voila we have a winner.

Set and done, ordering the ifs with the most probable outcome at top, and least probable at bottom and whilst before staring at the statusbar the calculating StatsPeriod indicator was pulsing and pulsing, another step has turned into being missed if blinking.

silly
[Mar 15, 2017 3:51:49 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

Humming Die Nussknacker Suite (by Tschaikowsky), churned out, yes, a whole suite of UDFs, and on the go-incidental, learned a simple prefix of a range with a + sign makes the passing not of the whole range, rather only the object searched for value... that's 1 field instead of the current archives 847K fields' content held in memory, and on that token, another stumble helped adding a function to the tool that shows how much memory is in use by the tool... it seems the bulk is being moved by the OS to the much slower VM.
[Mar 16, 2017 7:29:57 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
sad Re: Hunting Tool 3.0K

Am late for the bike ride, but could not hold this back any longer... Snooze BOINC, and the Hunting tool runs twice as fast, so scripted a shell instruction to boinccmd to suspend BOINC at start of a run and resume on finish... Not sure how 'polite' I will further view crunching on any business / school / gaming machine, let alone a server, but if an update cycle takes 16 minutes instead of 31 minutes and at work, I'd get very upset with that knowledge.

Still to investigate if instead setting % of processors to 75 at start through boinccmd, since the TaskManager shows the tool never uses more than 25% CPU resource on the octo in an 'allowed to use all cores' run, before final verdict, but for now have the client go into full pause when the scheduled runs take place.

sad
[Mar 18, 2017 11:26:07 AM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 3.0K

Today put, after some non-biking pensing [torrential rains], the Mel Brooks 'Ludicrous' front of Speed, a rethink on the resizing of the 250 records limited API fetches and the continuous [very costly] table resizing, and by adding several 'Case' tests [a superior in 'readability' substitute to If-Then, no executable difference after compiling] got something racing by, that could easily take an hour to go from 5000 to 135000 active records, and back to 5000 not 24 hours later, because the rigids and shorts keep alternating in FAHV in large blocks. The Case tests instead just erase the table content, but keeping the space reserved [yes database products do that], ready for the next time, then fetch the data, repopulate the calculated columns, zippy de zip, and zoofiani has gone by to the End Sub.... Asking: No more input ;?
[Apr 3, 2017 2:46:13 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Posts: 116   Pages: 12   [ Previous Page | 3 4 5 6 7 8 9 10 11 12 | Next Page ]
[ Jump to Last Post ]
Post new Thread