On Sun, Jan 3, 2021 at 8:11 AM David T. Lewis <[hidden email]> wrote: On Sat, Jan 02, 2021 at 02:56:49PM -0500, David T. Lewis wrote: Hi Dave, you are correct for someone who prepares an image that they use over and over again. However, for someone using a fresh image that was just created using ReleaseBuilder, there will be a isLowerPerformance send on startup (via ReleaseBuilder class>>startUp: with a DeferredTask set by prepareEnvironment to open the PreferenceWizardMorph which uses its own hasLowPerformance method to try to make things faster). Compare this 5.3 image with disabled wizard: to the latest trunk (very slow because Sista so no JIT): and that even has isLowerPerformance = true because we did fix the platform name check! If it was using your code then the "Time millisecondsToRun:[ 25 benchFib ]" would add 600 ms to the startup. Luckily it would bypass the "Time millisecondsToRun: [ 64 benchmark ]" which would take 4 seconds. So I'm in favor of Levente's idea, he proposed this: | vmStartTime uptime | vmStartTime := Smalltalk vmParameterAt: 20. uptime := vmStartTime ~= 0 "utcMicrosecondClock at startup in later Spur VMs" ifTrue: [Time utcMicrosecondClock - vmStartTime + 500 // 1000] ifFalse: [Time eventMillisecondClock]. ... which works in SqueakJS because of the eventMillisecondClock fallback (vmParameter 20 is 0). We just would have to decide where in the startup sequence to put this check, which is slightly tricky. An obvious place would be in #recordStartupStamp - I just tried it: recordStartupStamp | vmStartTime | vmStartTime := Smalltalk vmParameterAt: 20. StartupTime := vmStartTime ~= 0 "utcMicrosecondClock at startup in later Spur VMs" ifTrue: [Time utcMicrosecondClock - vmStartTime + 500 // 1000] StartupStamp := '----STARTUP----', Time dateAndTimeNow printString, ' as ', self imageName.ifFalse: [Time eventMillisecondClock]. ... and StartupTime is about 3000 ms. Then isLowerPerformance would become ^StartupTime > LowerPerformanceThreshold where LowerPerformanceThreshold would maybe default to 500? What's the StartupTime of e.g. a raspberry pi? Vanessa |
On Mon, Jan 4, 2021 at 7:58 PM Vanessa Freudenberg <[hidden email]> wrote:
Gob smacked. This is embarrassing. This needs to be a preference. I don't mind it being on by default. But I think both STARTUP and QUIT/No SAVE stamps need to be optional. I for one find it really annoying that QUIT/No SAVE stamps are added when nothing has occurred (a pain if one's image is under version control, for example). So I find myself using the Mac's Force Quit, or ctrl-c on the command line.
_,,,^..^,,,_ best, Eliot |
Hi all! At the time of writing, the wizard has a hard-coded list of somewhat costly preferences to turn off via #adjustSettingsForLowPerformance. We should check and update that list from time to time. The check for #isLowerPerformance may also be useful outside the scope of preferences. Well, maybe we can make it check the *remaining* resources for new workload to come. That is, there may already be a Squeak process eating up 99% of the image's resources. Then, any call to #isLowerPerformance should answer "true", of course. Even though we might be on a powerful machine. The current workload matters for the upcoming operations. Note that the current workload is expected to be low at image-startup time. ;-) So, somehow deriving a performance figure at that time makes sense to me. Here is a summary of your suggestions: A) Estimate processor mips from platform specs + eem o mt B) Take extra measurement via #timeToRun when checking #isLowerPerformance, may be cached + dtl + tpr o codefrau - eem - mt C) Profile image start-up via VM parameter 20 or similarly cheap timestamps + ul + codefrau + eem + dtl + mt All in all, we should follow up on Levente's suggestion. Note that I recently fixed the wizard startup in both Trunk and 5.3 to be 10x faster. Next step is to have the wizard be opened already in a fresh image -- to further speed up the first start. Best, Marcel
|
On Tue, Jan 05, 2021 at 09:58:22AM +0100, Marcel Taeumel wrote:
> Hi all! > > At the time of writing, the wizard has a hard-coded list of somewhat costly preferences to turn off via #adjustSettingsForLowPerformance. We should check and update that list from time to time. > > The check for #isLowerPerformance may also be useful outside the scope of preferences. Well, maybe we can make it check the *remaining* resources for new workload to come. That is, there may already be a Squeak process eating up 99% of the image's resources. Then, any call to #isLowerPerformance should answer "true", of course. Even though we might be on a powerful machine. The current workload matters for the upcoming operations. > > Note that the current workload is expected to be low at image-startup time. ;-) So, somehow deriving a performance figure at that time makes sense to me. > > Here is a summary of your suggestions: > > A) Estimate processor mips from platform specs > + eem > o mt > > B) Take extra measurement via #timeToRun when checking #isLowerPerformance, may be cached > + dtl > + tpr > o codefrau > - eem?? > - mt > > C) Profile image start-up via VM parameter 20 or similarly cheap timestamps > + ul > + codefrau > + eem > + dtl > + mt > > All in all, we should follow up on Levente's suggestion. > +1 for using Levente's approach Dave |
Free forum by Nabble | Edit this page |