"little brother" IoT
Move Code to Data
Pharo Smalltalk Resource Usage11/27/2017 One of the reasons for using Pharo, aside from the ease of controlling the hardware via object representations down to the pin level, is the relatively low resource usage compared with other IoT environments. The task manager screenshot below is of a Pharo instance which includes:
A deployment image containing the base development tools for remote debugging and code changes, little brother, and closure common lisp integrated, will use ~65 MB RAM. On an 8 thread I7 the maximum CPU usage I’ve seen in development (while test compiling a large project) was just over 29%. Running “little brother” under normal collection / pattern matching usage on the Raspberry PI 2 the maximum recorded in test was 22% of the ARM processor. While remoting the full IDE it peaked at 72% while loading and test compiling the ORM. The 64-bit VM for Linux and OS X uses about 20% more memory than the 32-bit VM, but since the ARM processor is 32-bit, I’m doing development now on a decent spec laptop with Windows 10 and Linux Mint 18 in a dual boot configuration, and a MacBook Pro for the OS X and iOS analysis interfaces. There is an alternate open source VM written by IBM to test the scalability of VM based languages which scaled to 1024 processors with 8 threads each nearly linearly. IBM didn’t have a bigger machine to test on. The Windows task manager screenshot, profiler output and a sample debug log are below, showing the memory usage, performance of individual collection classes and the garbage collector, and the ease of reading debug logs compared with other object languages. Windows Task Manager Output: Profiler output:
Tests: 4843 runs, 4843 passes, 0 skipped, 0 expected failures, 0 failures, 0 errors, 0 unexpected passes - 19727 tallies, 19789 msec. **Tree** -------------------------------- Process: (40s) Morphic UI Process: nil -------------------------------- 32.5% {6438ms} TestRunner>>runTestSuites: 32.5% {6438ms} CurrentExecutionEnvironment class>>runTestsBy: 32.5% {6438ms} DefaultExecutionEnvironment>>runTestsBy: 32.5% {6438ms} TestExecutionEnvironment(ExecutionEnvironment)>>beActiveDuring: 32.5% {6438ms} CurrentExecutionEnvironment class>>activate:for: 32.5% {6438ms} BlockClosure>>ensure: 32.5% {6438ms} CurrentExecutionEnvironment class>>activate:for: 32.5% {6438ms} TestRunner>>runTestSuites: 32.5% {6438ms} Set(Collection)>>do:displayingProgress: 32.5% {6438ms} Set(Collection)>>do:displayingProgress:every: 32.5% {6438ms} ByteString(String)>>displayProgressFrom:to:during: 32.5% {6438ms} MorphicUIManager(UIManager)>>displayProgress:from:to:during: 32.5% {6438ms} Job>>run 32.5% {6438ms} BlockClosure>>ensure: 32.5% {6436ms} Job>>run 32.5% {6432ms} CurrentJob class(DynamicVariable class)>>value:during: 32.5% {6432ms} CurrentJob(DynamicVariable)>>value:during: 32.5% {6432ms} BlockClosure>>ensure: 32.5% {6432ms} CurrentJob(DynamicVariable)>>value:during: 32.5% {6432ms} Job>>run 32.5% {6432ms} BlockClosure>>cull: 32.5% {6432ms} Set(Collection)>>do:displayingProgress:every: 32.5% {6422ms} Set>>do: 32.5% {6422ms} Set(Collection)>>do:displayingProgress:every: 32.4% {6404ms} TestRunner>>runTestSuites: 32.4% {6402ms} TestRunner>>runSuite: 30.6% {6046ms} TestRunner>>executeSuite:as: |30.6% {6046ms} BlockClosure>>ensure: | 30.6% {6046ms} TestRunner>>executeSuite:as: | 30.6% {6046ms} BlockClosure>>cull:cull: | 30.6% {6046ms} TestRunner>>runSuite: | 30.6% {6046ms} TestSuite>>run: | 30.6% {6046ms} CurrentExecutionEnvironment class>>runTestsBy: | 30.6% {6046ms} TestExecutionEnvironment>>runTestsBy: | 30.6% {6046ms} TestSuite>>run: | 30.6% {6046ms} TestSuite>>runUnmanaged: | 30.6% {6046ms} BlockClosure>>ensure: | 30.6% {6046ms} TestSuite>>runUnmanaged: | 30.6% {6046ms} OrderedCollection>>do: | 30.6% {6046ms} TestSuite>>runUnmanaged: | 30.1% {5955ms} ReadStreamTest(TestCase)>>run: | 30.1% {5955ms} TestResult>>runCase: | 30.1% {5955ms} BlockClosure>>on:do: | 30.1% {5955ms} TestResult>>runCase: | 30.1% {5955ms} ReadStreamTest(TestCase)>>runCaseManaged | 30.1% {5955ms} CurrentExecutionEnvironment class>>runTestCase: | 30.1% {5955ms} TestExecutionEnvironment>>runTestCase: | 29.5% {5829ms} BlockClosure>>ifCurtailed: | 29.5% {5829ms} TestExecutionEnvironment>>runTestCase: | 29.5% {5829ms} BlockClosure>>ensure: | 29.5% {5829ms} TestExecutionEnvironment>>runTestCase: | 25.1% {4977ms} TestExecutionEnvironment>>runTestCaseSafelly: | |25.1% {4977ms} BlockClosure>>on:do: | | 25.1% {4977ms} TestExecutionEnvironment>>runTestCaseSafelly: | | 25.1% {4977ms} BlockClosure>>on:do: | | 25.1% {4977ms} TestExecutionEnvironment>>runTestCaseSafelly: | | 25.1% {4977ms} BagTest(TestCase)>>runCase | | 25.1% {4977ms} FullBlockClosure(BlockClosure)>>ensure: | | 24.9% {4921ms} BagTest(TestCase)>>runCase | | 23.6% {4668ms} BagTest(TestCase)>>performTest | | |4.9% {967ms} BagTest(ClassTestCase)>>testMethodsOfTheClassShouldNotBeRepeatedInItsSuperclasses | | | |4.9% {967ms} BagTest(ClassTestCase)>>assertValidLintRule: | | | | 4.9% {965ms} SmalllintManifestChecker(RBSmalllintChecker)>>run | | | | 3.3% {658ms} RBClassEnvironment(RBBrowserEnvironment)>>classesAndTraits | | | | |3.3% {658ms} RBClassEnvironment(RBBrowserEnvironment)>>classesAndTraitsDo: | | | | | 3.3% {658ms} RBClassEnvironment(RBBrowserEnvironment)>>allClassesAndTraitsDo: | | | | | 3.3% {658ms} SystemDictionary>>allClassesAndTraitsDo: | | | | | 3.3% {654ms} OrderedCollection>>do: | | | | | 3.1% {614ms} SystemDictionary>>allClassesAndTraitsDo: | | | | | 2.7% {539ms} RBClassEnvironment(RBBrowserEnvironment)>>classesAndTraitsDo: | | | | | 2.6% {523ms} RBClassEnvironment>>includesClass: | | | | | 1.7% {327ms} ByteSymbol class(ClassDescription)>>isMeta | | | | 1.6% {307ms} Array(Collection)>>do:displayingProgress: | | | | 1.6% {307ms} Array(Collection)>>do:displayingProgress:every: | | | | 1.6% {307ms} ByteString(String)>>displayProgressFrom:to:during: | | | | 1.6% {307ms} MorphicUIManager(UIManager)>>displayProgress:from:to:during: | | | | 1.5% {303ms} Job>>run | | | | 1.5% {303ms} BlockClosure>>ensure: | | |4.4% {871ms} WeakOrderedCollectionTest>>testWeakOrderedCollectionSomeGarbageCollected | | | |4.4% {869ms} SmallInteger(Integer)>>timesRepeat: | | |4.4% {867ms} WeakOrderedCollectionTest>>testWeakOrderedCollectionAllGarbageCollected | | | |4.4% {864ms} SmallInteger(Integer)>>timesRepeat: | | |4.3% {847ms} BagTest(ClassTestCase)>>testTraitExplicitRequirementMethodsMustBeImplementedInTheClassOrInASuperclass | | | |4.3% {847ms} BagTest(ClassTestCase)>>assertValidLintRule: | | | | 4.3% {847ms} SmalllintManifestChecker(RBSmalllintChecker)>>run | | | | 3.3% {649ms} RBClassEnvironment(RBBrowserEnvironment)>>classesAndTraits | | | | 3.3% {647ms} RBClassEnvironment(RBBrowserEnvironment)>>classesAndTraitsDo: | | | | 3.3% {647ms} RBClassEnvironment(RBBrowserEnvironment)>>allClassesAndTraitsDo: | | | | 3.3% {647ms} SystemDictionary>>allClassesAndTraitsDo: | | | | 3.2% {642ms} OrderedCollection>>do: | | | | 3.2% {628ms} SystemDictionary>>allClassesAndTraitsDo: | | | | 2.7% {542ms} RBClassEnvironment(RBBrowserEnvironment)>>classesAndTraitsDo: | | | | 2.6% {521ms} RBClassEnvironment>>includesClass: | | | | 1.7% {332ms} AthensCanvas class(ClassDescription)>>isMeta | | | | 1.2% {231ms} AthensCanvas class(ClassDescription)>>isClassSide | | |1.7% {336ms} ByteSymbolTest>>testReadFromString | | | |1.5% {299ms} Array(SequenceableCollection)>>select: | | |1.6% {319ms} ByteSymbolTest>>testAs | | | |1.4% {287ms} Array(SequenceableCollection)>>select: | | |1.5% {296ms} ByteSymbolTest>>testNewFrom | | | 1.4% {270ms} Array(SequenceableCollection)>>select: | | 1.3% {254ms} WeakIdentityKeyDictionaryTest(WeakKeyDictionaryTest)>>setUp | | 1.2% {228ms} Array(SequenceableCollection)>>do: | | 1.1% {222ms} WeakIdentityKeyDictionaryTest(WeakKeyDictionaryTest)>>setUp | | 1.0% {200ms} WeakKeyDictionary>>at:put: | 4.3% {853ms} primitives 1.8% {356ms} TestRunner>>updateResults 1.8% {348ms} TestRunner>>updateStatus: 1.8% {348ms} TestRunner(Model)>>changed: 1.8% {348ms} DependentsArray>>do: 1.8% {348ms} TestRunner(Model)>>changed: 1.8% {348ms} PluggableTextFieldMorph>>update: 1.8% {348ms} PluggableTextFieldMorph(PluggableTextMorph)>>update: 1.4% {278ms} PluggableTextFieldMorph>>getText 1.4% {278ms} TestRunner>>statusText 1.4% {278ms} TestResult(Object)>>printString 1.4% {278ms} TestResult(Object)>>printStringLimitedTo: 1.4% {278ms} String class(SequenceableCollection class)>>streamContents:limitedTo: 1.4% {278ms} TestResult(Object)>>printStringLimitedTo: 1.4% {278ms} TestResult>>printOn: 1.4% {270ms} TestResult>>runCount 1.3% {262ms} TestResult>>passedCount 1.3% {259ms} TestResult>>passed 1.3% {257ms} TestResult>>expectedPasses 1.3% {257ms} OrderedCollection>>select: 1.3% {257ms} TestResult>>expectedPasses 1.3% {257ms} BagTest(TestCase)>>shouldPass 1.3% {257ms} BagTest(TestCase)>>isExpectedFailure 1.3% {255ms} BagTest(TestCase)>>expectedFailures 1.3% {253ms} Pragma class>>allNamed:from:to: 1.3% {253ms} Array class(SequenceableCollection class)>>streamContents: 1.3% {253ms} Array class(SequenceableCollection class)>>new:streamContents: 1.3% {253ms} Pragma class>>allNamed:from:to: 1.3% {253ms} BagTest class(Behavior)>>withAllSuperclassesDo: **Leaves** 8.8% {1732ms} SmallInteger(Integer)>>timesRepeat: 4.9% {978ms} TestExecutionEnvironment>>runTestCase: 2.6% {520ms} Array(SequenceableCollection)>>select: 1.6% {311ms} GLMTreeMorphModel class(Class)>>name 1.4% {276ms} ByteString(String)>>= 1.2% {240ms} ByteSymbol class(ClassDescription)>>isMeta **Memory** old +0 bytes young +1,524,464 bytes used +1,524,464 bytes free -1,524,464 bytes **GCs** full 34 totalling 14,731ms (74.0% uptime), avg 433.0ms incr 168 totalling 301ms (2.0% uptime), avg 2.0ms tenures 29,787 (avg 0 GCs/tenure) root table 0 overflows Sample Debug Log: THERE_BE_DRAGONS_HERE Debug 26 November 2017 2:32:15.457907 pm VM: Win32 - IX86 - 10.0 - CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017 StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017 VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $ Plugins: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Image: Pharo6.0 [Latest update: #60520] Process>>debugWithTitle: Receiver: a Process in nil Arguments and temporary variables: title: 'Debug' context: Process>>debugWithTitle: Receiver's instance variables: nextLink: nil suspendedContext: nil priority: 40 myList: nil name: 'Morphic UI Process' env: a WeakArray(nil nil nil nil nil nil nil a Job nil nil) effectiveProcess: nil terminating: false Process>>debug Receiver: a Process in nil Arguments and temporary variables: Receiver's instance variables: nextLink: nil suspendedContext: nil priority: 40 myList: nil name: 'Morphic UI Process' env: a WeakArray(nil nil nil nil nil nil nil a Job nil nil) effectiveProcess: nil terminating: false Job>>debug Receiver: a Job Arguments and temporary variables: Receiver's instance variables: block: load RPackageSet withCacheDo: [ | version | version := versions fi...etc... currentValue: 0 min: 0 max: 100 title: 'Loading ConfigurationOfTestsUsageAnalyser-BenoitVerhaeghe.1503412210' children: an OrderedCollection(a Job) isRunning: true parent: a Job process: a Process in nil JobProgressMorph>>debug Receiver: a JobProgressMorph(555060992) Arguments and temporary variables: Receiver's instance variables: bounds: ([email protected]) corner: ([email protected]) owner: a SystemProgressMorph(135007232) submorphs: an Array(a StringMorph(252225280)'Loading ConfigurationOfTestsUsageA...etc... fullBounds: (31@65) corner: (469@98) color: Color transparent extension: a MorphExtension (19710976) [other: (announcer -> an Announcer)] bar: a JobProgressBarMorph(867591168) endValue: nil hasResult: false job: a Job labelMorph: a StringMorph(252225280)'Loading ConfigurationOfTestsUsageAnalyser-...etc... lastRefresh: 0 lock: a Semaphore() result: nil startValue: nil MorphEventSubscription>>notify:from: Receiver: a MorphEventSubscription Arguments and temporary variables: anEvent: [(282@92) mouseUp 69360937 nil] sourceMorph: a JobProgressBarMorph(867591168) arity: 0 Receiver's instance variables: event: #mouseUp selector: #debug recipient: a JobProgressMorph(555060992) valueParameter: nil result in MorphicEventHandler>>notifyMorphsOfEvent:ofType:from: Receiver: a MorphicEventHandler Arguments and temporary variables: result: false anEvent: a MorphEventSubscription eventType: a JobProgressBarMorph(867591168) sourceMorph: [(282@92) mouseUp 69360937 nil] Receiver's instance variables: subscriptions: a Dictionary(#mouseUp->a Set(a MorphEventSubscription) ) Set>>do: Receiver: a Set(a MorphEventSubscription) Arguments and temporary variables: aBlock: result index: 4 each: a MorphEventSubscription Receiver's instance variables: tally: 1 array: an Array(nil nil nil a MorphEventSubscription nil)
1 Comment
If you're a blogger or content writer or maybe even a search engine optimisation specialist, then searching for unique artistic content that focus your merchandise or services as online identity. Since you may see, quality content is key and ought to be taken seriously. Get the Best <a href="https://kazafi.com/best-rewrite-tool-spinning-article/"target="_blank">Rewrite Tool</a> then after you have good excellent content on your website or blog you'll be able to send people there.
Reply
Leave a Reply.AuthorAndrew Glynn, Owner, architect and developer, philosopher, and soccer fan. ArchivesCategories |