Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Slow startup on raspberry pi

by Anonymous Monk
on Jan 16, 2015 at 12:45 UTC ( [id://1113505]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Slow startup on raspberry pi
in thread Slow startup on raspberry pi

Maybe perl is simply not appropriate on low performance platforms except for one-liners and I have to rewrite the stuff in C.

But I thought earlier you said "Once running, the performance is good"? It sounds like you're just running this script once on boot, like a daemon, or does it get started & stopped more often? If just once on boot, I'm not sure what the problem is, why do you really need to optimize the boot time? I understand the speed might be a bit annoying during development but hey, that's the price for running on that hardware ;-) Maybe you can develop on a desktop machine?

The Rasperry Pi is in general "slow" by modern standards so if you want to use it you'll have to live with a bit of relative slowness no matter what you do with it - try running startx on it to get a feeling for the speed! FWIW, I've written a bit of Perl for the Pi myself, admittedly with less modules than you're using, and those scripts ran just fine.

Replies are listed 'Best First'.
Re^4: Slow startup on raspberry pi
by vivat (Initiate) on Jan 16, 2015 at 13:23 UTC
    The overall boot time is crucial for that application. I optimised the raspberry pi boot time to 20s but get additional more than 10s by this perl script. I.e. the whole linux system needs 20s but a simple perl script adds 10s.
      It's not a simple Perl script your modules are using other modules which in turn use other modules ...

      And at least one of them is either doing heavy initialization or IO accessing.

      Reprogramming it in C won't help much.

      But learning how to use the NYT profiler and identifying the bottleneck is far more efficient.

      Cheers Rolf

      PS: Je suis Charlie!

      The overall boot time is crucial for that application.

      Ok, thanks for the clarification. I'm still not really surprised that you're getting that kind of performance out of the Pi in general... how fast is your SD card? Perhaps throwing a little more hardware at the problem would help? For example I've read good things about the quad-core 1.5 GHz ODROID-C1, for $35 (http://www.hardkernel.com/).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1113505]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found