Raspberry Pi Model 2 – A Comment On Function

You know, I’m finding that I like the Raspberry Pi Model 2 more as time wears on.

The only really “unpleasant” thing is that it is a bit too slow for making postings. Frankly, I think a lot of that is the fault of WordPress. The “spell checker” for example, is very ‘chatty’ to the internet. I think it sends up all the words every so often as it gets slower as the posting gets longer… there’s ‘check box’ on a ‘right click’ that lets you turn it off and on, so I think others have noticed this too. Then there’s the problem that IceApe can only use one core, so can’t walk and chew gum at the same time…

The Epiphany Browser is a more efficient one made for the R.Pi; but in using it on the M2, it tends to crash. Open it, then, before it has had time to finish loading the main page and while it is ‘working’, move the window around your screen. Usually crashes… I think it, too, does not expect a multi-core environment but instead of ignoring the others, gets confused by them.

I’d likely use Chromium (that does know how to use multiple cores) but the ‘first use’ was prone to screen display mess – skewing; which seems to have been fixed in the last update; but I’ve not gone back to try settling in to it again.

All these symptoms of a ‘young port’ of Linux to this new multi-core board.

But…

Right now I’m running my WAN port nailed to the wall with a data download. No speed limits. The R.PiM2 is just cooking on it. At the same time, I’ve got a 40 GB or so file transfer from one USB disk to another. It’s just cooking along too. Finally, I’m doing this posting as I wait for those things to complete. All while I have about 2.5 TB of disk mounted on the poor thing on three spindles of ‘real disk’ along with a 32 GB USB stick and the 64 GB SD card.

I’m running about 50% total CPU usage. It would likely be more if IceApe could use more than one core. But even as it is, “top” shows me the “tar” tape archiver happily moving data, the wget downloading (both mostly I/O bound), the Xwindows app working the display load, IceApe using its one core… and with cycles left over if only the software knew about multi-core or I had more I/O capacity either in my internet connection or in my USB disks.

So given about 6 more months of folks ‘tuning’ Raspbian for multi-core, it ought to be even more ‘comfortable’. As it stands now, it is quite “usable” as a general purpose Linux workstation, and almost comfortable for WordPress postings. (Why WordPress posting is such a pill is for others to work out. I have observed that in addition to the ‘chatty’ spell checker, it does a periodic ‘save’ of the entire posting in progress, and on large postings that can cause a noticeable ‘pause’ on any browser / system I’ve used. Likely their ‘developer’ just sits on the corporate LAN and doesn’t notice…) I’m seeing roughly the same “lag issues” that I’d seen without all that other stuff going on (a little bit more lag on network transfers as wget is saturating the pipe). So I think it is mostly WordPress sucking up a lot of resource inside IceApe that can only use one core. Other cores and other I/O free for other process to run full tilt.

At any rate, the little guy has been a decent browser station and very competent file copy station / FTP downloader during the last 3 days as the Intel 64 Bit Box was tied up playing with it’s disk.

I’d not expected to give the R.PiM2 so many things to do at once, but it seems quite happy to do them. It would benefit from a slightly larger single core performance (so an A15…) as long as IceApe is bound to one core only, and it would benefit from more code being multi-core aware. Also, that FORTRAN multi-core sample code I ran implies something in the multicore code is very stupid and needs improvement. But for “multiple single core apps” it does just fine.

BTW, I also have it running a DNS server and its own local Web server as well. They are not taking much in the way of cycles at the moment, but they are launched and running. So ‘no worries’ about it having several apps in the air at once.

With that, I’m going back to the “I/O Wars” as I dig my way out of the hole I made with too many GB of temperature data going into too many temporary buckets all too small and try to get it all corralled into one much bigger bucket…

Subscribe to feed

About E.M.Smith

A technical managerial sort interested in things from Stonehenge to computer science. My present "hot buttons' are the mythology of Climate Change and ancient metrology; but things change...
This entry was posted in Tech Bits and tagged , , , , . Bookmark the permalink.

12 Responses to Raspberry Pi Model 2 – A Comment On Function

  1. p.g.sharrow says:

    Well, I would have to say that this multi-core, multi-tasking is way beyond my mandate for a “Beer Can” nodal computer system. This result certainly impresses me! Looks like the buckets you are using to catch the deluge of data that you want to mine are a bit too small for that task. Maybe data management needs more thought. …pg

  2. E.M.Smith says:

    @P.G.:

    Yeah, tell me something I don’t already know… ;-)

    Posting up in a minute on just that “data management”. The basic problem is having no idea at all how big the data download will actually be while finding out it is far bigger than expected and near the size of all available free-space at hand… so you end up running around kludging something together…

    The good news is that once done, I can put up some numbers so nobody else must go through this Chinese Fire Drill exercise…

  3. p.g.sharrow says:

    A valuable exercise then, not a waste of time. When you must wander out into the wilderness without a guide sometimes you get lost or at least off of the known path. Remember the Pathfinders of old, examining the terrain for the way to new places. Much of the time they wandered in circles the first time through. Then they led others by the Best route. ;-) I spent much of my life out in the wilderness looking for better ways.
    We live in interesting times…pg

  4. Sandy McClintock says:

    Hearing about the capabilities of your Pi Model 2 makes it easy to understand why the server that I administer for a local Not-for-profit, can run remote Windows sessions for a dozen people with no effort. We had the choice of one expensive (IBM) server, or two cheap home-brew Core i5, we opted for two ~$500 home-brew servers and keep one off-site, as an emergency spare.

    Since 1985 (Fat Mac era) I have used my I/O testing Fortran program to check the speed of whatever machine I had in daily use. Here is todays reading..
    50000000 Records have been Written to disk in
    18.2344 seconds. (Unformatted)
    2742073 records per seconds
    80603.72 K Bytes per seconds
    50000000 Records have been Read from disk
    10.8242 seconds. (Unformatted)
    4619271. records per seconds
    535835.44 K Bytes per seconds
    PAUSE Deleting the temporary file statement executed.
    Hit Return to continue

    I notice today’s write-performance is down 50% … so need to investigate ;)
    Source available if you want it.
    IBM1130 from 1970 managed ~1 record per second compared with several millions now :)

  5. Paul Hanlon says:

    I’m finding the same thing. It’s really only when it comes to the graphics that the SOC’s become challenged. But on everything else, they continue to amaze me. And it’s kind of understandable, given it is doing most of the rendering through X. Maybe Wayland will improve things.

    As I was researching into the Tails OS, I came across some very interesting links. This is a link to a Raspbian netinstall, i.e. the absolute minimum required to get a Pi up and running. For someone wanting to build pretty much from scratch, it could be a good option.

    One of the things that really bug me is the potential corruption of the SD Card. I’m particularly thinking of commercial applications here where the potential that it might not start is a complete no-no. And it turns out that the solution to that is also the solution to having a pseudo “Boot from USB”. I say pseudo because you still need to have a small SD Card from which to initialise the boot process (this is hard-coded into the graphics chip).

    But basically, you put all of /dev/mmcblk0p2 onto the USB dongle and do some configuring. This is the best thread I’ve seen for the full rundown on how to do that. It means that everything on /dev/mmcblk0p1 can be read-only, so no corruption on that at least, and USB sticks are better able to cope with lots of small writes. And it also means that you have the root partition and data on the USB stick, so once unplugged, nothing is left on the Pi. Plug in a different USB stick, different OS with its own data.

    The last link (although I probably should put this into the Tails thread) is Coreboot. I have seen you refer to SeaBIOS here, so you probably already know about it but this completely blew me away. The BIOS part basically turns the computer on, and then passes over all the discovery to Linux, which can then load a bootloader, or just carry on and boot for itself. 10 seconds from switch on to login screen. Minimal duplication of effort. Awesome.

  6. Pingback: Well That Was Fun, sort of… | Musings from the Chiefio

  7. Paul Hanlon says:

    The Raspberry folks have just launched a 7″ touch screen for around $60. It looks good. As I was reading through it I noticed an interview with Eben Upton and i watched it. Main takeouts are:

    Graphics screen released. A lot of work was done reducing the amount of EM interference. A 10″ screen is in the works.

    Work on Maynard / Wayland has stalled, and they are now working on Accelerated X to use the graphics chip directly to render the screen. A ton of work has gone into the Epiphany browser with more to come.

    Educational stuff continues apace, but they would like to focus on South America and Africa, as they haven’t penetrated those areas in the way they would like to.

    Lots of new appointments in various areas of the business. Software is where they will be putting in their major effort for the next few years.

    They are on course for 3.6m unit sales this year.

  8. E.M.Smith says:

    @Paul:

    Golly… 3.6 M per year, for several years and rising… ought to be interesting in about 2020…

    Then add in all the Orange Pi, Cubieboard, Banana Pi, etc. knockoffs… This is likely to be headed to the 10 M /year range ‘right quick’, so 50 to 100 million in a few years.

    We Haw!!

    And yes, it’s the graphics load that’s an issue. (Though for WordPress editing, it adds a large gratuitous layer of WAN wait states as it is constantly shuttling the article you are writing back and forth to the server and spell checker… it gets really rough on slow links…) So it needs a bit more “umph” to do video right IMHO (though maybe the guys doing the media servers have fixed the software enough for that to be working well…)

    I like the idea of doing a ‘boot to USB’. Maybe I’ll work on that next week… OTOH, it might also be reasonable to have a “boot from USB hard disk” and just have the interesting bits all live on that one thing that always gets put in your backpack pocket when away from keyboard ;-) I like the idea of having swap on a real magnetic platter, so typically have a small USB drive with swap plugged in. call me paranoid… or experienced… or both ;-)

    @Sandy:

    Ah, a person after my own heart ;-) “one offsite for a spare”… Part of the attraction of the R.Pi is that when things are more settled, I can just bundle up a package for about $200 that does everything I want, put it in an “Ammo Can” that is iron with air tight seals, and it’s EMP proof, storm proof, rodent proof, etc. etc. Just right for that Post Apocalypse Web Surfing ;-) Would want to include a 7 inch screen and keyboard along with a tiny 12 vdc to 120 AC inverter to power it from any old car battery…

    But yes, you get a LOT of horsepower for the $$$ in generic hardware with Linux on it. For non-graphic things, you can power a load of real work from an ARM cpu, more from a generic Intel x86.

  9. Paul Hanlon says:

    @Chiefio,
    Yes I’d say that estimate is in the ballpark. I was just looking at another “knock off”, the Olimex. I think they’re a Bulgarian company. They’re doing a range of boards, all based on ARM, at very competitive price points. Only problem there, no SATA.

    It really does make a difference. I have all my music on the disk and a web interface to view and play it. I click on a link to a file, and the playback is instant. I’m talking the rising edge of the second click. It goes from my browser through the local net, through a php file which has to be opened and parsed (twice, because it is interpreted), which among other things, opens the file and starts streaming it back to my browser.

    And “booting from disk” is the very next thing I want to do with the Cubie. Cubian is basically Raspbian for the Cubie, so I’ll be able to follow along on any tutorials. It also boots the same way. Graphics chip wakes first and calls /boot/cmdline.txt (in Cubie it’s uEnv.txt). Here’s its text:

             console=ttyS0,115200
             root=/dev/mmcblk0p2 rootwait
    

    The second line is where the magic happens. There’s other configuring with /etc/fstab (on the disk/stick, not the SDCard), but nothing gnarly. Cubie has an on-board 4GB NAND, and that’s where I want to put the first partition. It will boot from the NAND if there’s no SD Card with uEnv on it, in fact I learnt after that there is already Android 4 pre-loaded on NAND, and I’m kicking myself I didn’t at least try it out.

    But yes, I’m sure I saw in the comments to the link up thread that someone successfully got it on a USB hard drive, and thought it was quicker. Others who made the first partition read-only. It’s definitely the right first step.

    I can’t think why it wouldn’t be possible to put the Adafruit Tor anonymizer onto the USB partition, which should mean you would plug the stick in, turn on the Raspi, be anonymous, store your stuff on the USB, shutdown, unplug the stick, with nobody any the wiser. That might be a good second step.

    There’s other things you can do with that set-up such as make yourself a relay, and, worth it for this alone, be able to set up a “presence” in any country (all in that link). After that, it would be a case of configuring the things that that setup doesn’t have that TAILS does.

  10. E.M.Smith says:

    @Paul:

    Yup, you caught me! I was (am) working my way up the technical food chain to a full on RaTails via the slow process of “one tech at a time”. Since loop file systems and ramdisks and all are fundamental to all that, as is encryption of data blobs, I decided to start with a loop file system, then add encryption, do some time trials and all (showing that using NTFS is a Very Bad Idea so far…) and then proceed to making a generic OS boot “in the mode”.

    So next on my quasi-plan is to take a plain old Raspbian, have it boot from a USB stick, and into a RAM disk. Loop mounts and all… along with learning that union file system trick of writing to RAM disk and only later flushing back to a backing store if desired, or having it be ‘disposable’ for the Amnesiac portion of tAils…

    At least, that’s the road map I envision at the moment. Sometimes a different tech path presents itself and things change.

    BTW, WordPress ate your Olimex link, so I just pasted in a link to their product list. If there was a particular board you wanted to show, let me know (there are a lot of products listed so I couldn’t figure out which one you were talking about without some search time…)

    And yes, the putting TOR on the R.Pi link is a nice one. I’d figured on doing that as the next step after getting the basic union fs, loop encryption filesystems, boot off chip bits learned. At that point, you’ve got 90% of Tails. Encrypted disk, amnesiac boot / RAMdisk, onion routing / VPN to a remote ISP spigot, etc. At that point, it gets into the weeds of locking down applications that like to spy on you, like your browser, and I expect that just compiling in the TOR project ones would be enough (they provide source) and I’m hoping someone else has already done it by the time I get there (kind of like that porting of TOR routing…)

    For folks who have already done all those bits, the path will be faster than for me as I need to get comfortable with “things I’ve never done before” like building an OS that runs in a unionfs RAMdisk from scratch… But that’s how open source works. You start in on something and it’s a race condition. Sometimes the slower guy wins as the faster guys who’ve already “done that” are doing other things…

    I likely ought to sketch out a glide path to RaTails with key steps annotated. A “project plan” of sorts… even if a cut down one without PERT chart, critical path, staffing and budget…

  11. Paul Hanlon says:

    Well, it’s not like you haven’t been dropping hints along the way :-)). I think your approach has to be the right way to go. My own approach is complementary to yours in the sense that I’ve been focusing on the frontend more so than the backend (I haven’t got anything like your level of guru-hood there). HTML5 has really opened up the browser.

    It’s possible now to speak to your browser and have it send commands back to the server, just like okay google and siri, except it’s neither of them. Want a browser to browser video chat with a friend with no intervening broker in the middle during the conversation? That too. A full blown “bash” terminal with access to all the normal commands (not just a small subset like you’d get in the Chromebox, or a Chromebook). That’s doable, but it’s a bit gnarly.

    My eventual aim is a full blown web frontend into the server. A kind of Owncloud but web-based, and with more features. It has a really nice file management system where you can navigate through the filesystem a tree at a time, and view the file directly in the interface. Browsers already have a lot of that, and I’ve heard of a wrinkle where you can get LibreOffice to open say a .doc file, convert it to html in the background and spit that out to the browser. Excel files as well. A lot of the file editing can be done now through Javascript and just be sent to the server for saving.

    It wouldn’t be for everyone, you’re just a password away from being owned. But without the password, it is pretty secure and you’ve the added option of https. I believe the EFF (Electronic Freedom Foundation) have or will be becoming a certificate authority and issuing free certificates, so that will be a big help.

  12. Pingback: RaTails – Draft High Level Steps | Musings from the Chiefio

Comments are closed.