-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time to start up kevoree on PI and Edison #11
Comments
I think I could improve the start-up time in general. Didn't put that much thoughts in it for now because I'm running on a killer laptop machine, but we definitely need to look into this. |
Is it for nodeJs node ? 2015-03-13 14:08 GMT+01:00 Maxime Tricoire notifications@github.com:
|
This is the nodejs on PI: http://node-arm.herokuapp.com/node_latest_armhf.deb |
Also we should try to identify if the performances of node are ok once everything has been deployed. One alternative is of course to go directly in C/C++, as would recomment @ffleurey, but we would have a less flexible support with Kevoree (though something like the "sintefboard" could be achieved. |
Doing as @maxleiko proposed: starting grunt with option --no-reinstall reduced the startup time to: |
Using the latest You need to update your grunt.registerTask('build', 'Build Kevoree module', function () {
if (process.env.KEVOREE_RUNTIME !== 'dev') {
grunt.tasks([
'kevoree_genmodel'
]);
}
}); Note that, for browser-ready component/channel/group/node you will also need to add the grunt.registerTask('build', 'Build Kevoree module', function () {
if (process.env.KEVOREE_RUNTIME !== 'dev') {
grunt.tasks([
'kevoree_genmodel',
'browser'
]);
}
}); This trick will prevent |
Another great way to save time is to always use the same directory for your deploy units installations. Using kevoree: {
options: {
modulesPath: '/a/path'
}
} |
@maxleiko When starting kevoree with the following command: kevoreejs -p . -n node0 --kevscript main.kevs it takes a lot of time. It seems like the node has downloaded about 42 MB to get started. However, this happened the first time I started the node after not restarting it for several days. Next time it went much faster and it did not download much data. Is there a way to make the node not reload all the components and rebuild? |
Did you checked before if there was a |
I have made some benchmarks using the HEADS weather station:
Regarding the node_modules, it has been discussed. Regarding the RAM, a x15 (or +280 MB) overhead seems quite heavy. I understand the dynamicity brought by KevoreeJS needs RAM, but the price to pay is quite high.... I did the experiments on my PC, but if we assume they are the same on Edison, a simple Weather station would consume 33% of the RAM there... @maxleiko any idea why you need so much RAM? Is that needed or more like accidental? |
Did you benchmark in dev mode or not ? I think there are significant changes between a classic prod node_modules and the dev node_modules. For the RAM consumption I didn't investigate that much the issues. I will though as I really want the runtime to start faster and take less RAM. |
@brice-morin |
10 Mb for the dependency tree is a bit huge. Isn't it ? 2015-07-23 9:43 GMT+02:00 Maxime Tricoire notifications@github.com:
|
╭─leiko@kevtop /tmp/test-npm
╰─➤ node app.js
without npm
======
mem usage:
rss 13mo
heapTotal 9mo
heapUsed 3mo
=======
now loading NPM
npm loaded
======
mem usage:
rss 35mo
heapTotal 30mo
heapUsed 15mo
=======
now installing: kevoree-comp-consoleprinter
kevoree-comp-consoleprinter@5.2.9 node_modules/kevoree-comp-consoleprinter
└── kevoree-entities@8.0.5 (pseudoclass@1.0.3, kevoree-commons@2.1.2, kevoree-library@5.0.9, kevoree-kevscript@2.2.3)
kevoree-comp-consoleprinter installed
======
mem usage:
rss 97mo
heapTotal 72mo
heapUsed 40mo
======= This is the output. If you keep on installing module, you will see the heap growing and growing. |
Okay, so my guess was ok-ish |
Got Raspberry Pi 2 today and tested the HomeGW on it. Startup time went down from 2 minutes (Raspberry PI B+) to 20 seconds :-) |
Starting my fairly simple kevoree js node on a Raspberry Pi Model B+ 700MHz took me exactly 4 minutes and 20 seconds !!! And that was not the first time when compiling and downloading libraries which made it take even longer time.
On Edison it took 1 minute and 20 seconds, less time but still..
What are your thoughts about this? Is node well suited to run on devices like Edison and PI or is it our framework which makes it so slow? Edison and PI are not a PC, but still quite powerful devices.
The text was updated successfully, but these errors were encountered: