Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Slow startup on raspberry pi

by hardburn (Abbot)
on Jan 16, 2015 at 20:35 UTC ( #1113545=note: print w/replies, xml ) Need Help??


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

String eval is always slow, and it's generally recommended to avoid them when possible on any platform. It's particularly slow on an Rpi, because Rpis are also slow.

A RAM disk is not a bad idea if you can spare the memory, but I don't think it will be particularly helpful in your case. Since the loadup time at boot is what matters to you, you'll just move that time from the "perl" invocation to the copy command. You *might* see some gains by loading the modules all together with PAR, but that could easily move the problem from I/O to the CPU (due to decompression).

The first place I would look is making sure you have a good power supply, and the second place is making sure you have a quality SD card.


"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^4: Slow startup on raspberry pi
by LanX (Archbishop) on Jan 16, 2015 at 20:40 UTC
    Thanks, but I'm not the OP ;)

    and FWIW I'm aware that string eval is slow, but still it shouldn't have a disproportional effect on PI, otherwise I'd like to know why .

    Cheers Rolf

    PS: Je suis Charlie!

      D'oh, sorry.

      Actually, one thing I noticed is that his script uses threads. And then I noticed, to my horror, that Raspbian's perl is compiled with threads by default. Getting rid of that is going to be maybe a 10-20% speedup right there.


      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

        IIRC, Debian also compiles Perl with 64bit integers in all the supported architectures. Maybe it is the same for Raspbian.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2019-09-18 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (238 votes). Check out past polls.

    Notices?