# Raspberry Pi vs. Linux Virtual Machine

**URL:** <https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577>\
**Category:** General\
**Created:** [18 June 2020 23:04 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577 "2020-06-18T23:04:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrainBomber100](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brainbomber100/32/25400_2.png) [@BrainBomber100](https://discourse.nodered.org/u/BrainBomber100)\
**Post date:** [18 June 2020 23:04 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/1 "2020-06-18T23:04:34Z")

</div>

Hello! I was wondering whether it would be more cost-efficient to run my own Node Red server on a Raspberry Pi or a virtual machine on my laptop. I don't exactly have a spare computer lying around to use as a server, so I figured that buying a Raspberry Pi would be more cost-effective for running a server, since I could also use it for other projects if I wanted to. I'm also kind of scared of somehow messing up my laptop while learning how to use a virtual machine, since I'm new to Linux and what it has to offer. What do you guys think?

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [19 June 2020 00:48 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/2 "2020-06-19T00:48:10Z")

</div>

It depends on what you end result is that you want to achieve.

Obviously running it on your laptop (which presumably will leave the house with you occasionally) would mean that anything you run on it can not be relied upon to control your house etc. If on the other hand it is just for playing around with and learning - then a virtual machine that is close at hand is easy.

A Rpi will definitely be cheaper to run than a Virtual machine on a laptop - BUT the investment in the RPi, power supply, case, fan, etc etc will end up probably paying for a couple of years of electricity for your laptop

Craig

---

<div class="post-metadata">

**Author:** ![BrainBomber100](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brainbomber100/32/25400_2.png) [@BrainBomber100](https://discourse.nodered.org/u/BrainBomber100)\
**Post date:** [19 June 2020 01:42 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/3 "2020-06-19T01:42:06Z")

</div>

Would the virtual machine perform better than the Raspberry Pi under a high volume of nodes?

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [19 June 2020 01:43 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/4 "2020-06-19T01:43:53Z")

</div>

Assuming that you have a reasonably specced laptop and can give adequate resources to the VM - then yes easily - but to stress one of the new RPi4 you are going to have to get it to do a LOT of work - so do not let that be a deciding factor

Craig

---

<div class="post-metadata">

**Author:** ![BrainBomber100](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brainbomber100/32/25400_2.png) [@BrainBomber100](https://discourse.nodered.org/u/BrainBomber100)\
**Post date:** [19 June 2020 02:58 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/5 "2020-06-19T02:58:33Z")

</div>

Would it be possible to use the RPi4 for other functions while running the server, in case I wanted to do different projects at the same time?

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [19 June 2020 03:13 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/6 "2020-06-19T03:13:32Z")

</div>

Yep they are pretty versatile

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [19 June 2020 05:52 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/7 "2020-06-19T05:52:10Z")

</div>

I'm running Node-RED, Mosquitto, InfluxDB, Grafana, Traccar, Blynk server, zigbee2mqtt, rtl\_433 and Portainer running on Docker instances on a Raspberry Pi 4 8GB model. Albeit fhe services have just been configured and the memory usage will likely go up on actual usage, I'm only using 2GB of memory at this point and the system responds are _very_ snappy.

Node-RED is just a small bit of the usage so you don't have to worry about a bit of running other projects at the same time. 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 June 2020 08:42 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/8 "2020-06-19T08:42:17Z")

</div>

Why have you suggested running a VM on the laptop rather than just running it in Windows? I don't use Windows but many do use it with node-red.

On the Pi route if you want to try it with minimum initial expenditure a Pi Zero running Raspbian Lite (so no GUI) will run node-red and mosquitto perfectly well provided you are not looking at thousands of nodes or millisecond response.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 June 2020 21:28 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/9 "2020-06-21T21:28:13Z")

</div>

Using a VM, as Colin says, is really overkill here. If you really feel the need to keep it separate from the rest of the laptop, I'd advise installing the Windows Subsystem for Linux (WSL) and add the Ubuntu image. This uses a much more lightweight VM platform and in the next release of Windows (arriving as we speak), it is getting ever more closely integrated and more feature complete.

When considering a Pi, you need to think about how much memory it will have. A Pi 4 is a powerful platform but will still be restricted if you only have a gig of memory.

I run 2 Pi's at the moment (a 2 and a 3). They both run many services but neither runs a desktop and both are at capacity, mainly due to me either keeping too much data in InfluxDB or because I run crazy things like the Java-based Ubiquity Wi-Fi controller application along with Node-RED, MQTT, InfluxDB, Telegraf and Grafana.

I now also run an old (not that old but a few years old) Lenovo Thinkpad x240 (8GB RAM, 512G HDD) as my new server platform and I'll be retiring the Pi's for their current use (they will probably pop up again in the future of course for some other purpose). Running the laptop in power saving mode without a desktop running keeps the power consumption well below 20w, maybe as low as 12w - certainly low enough not to worry about cost and also not to trigger the fans. This is faster and more reliable over all than a Pi because I'm not running of an SD-Card and I have a built-in battery backup 😄 Of course, not everyone has such things lying around.

Anyway, bottom line:

- You don't need Linux to run Node-RED
- Use something separate to your laptop if you want it running all the time
- Even a Pi2 can do a LOT.

---

<div class="post-metadata">

**Author:** ![BrainBomber100](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brainbomber100/32/25400_2.png) [@BrainBomber100](https://discourse.nodered.org/u/BrainBomber100)\
**Post date:** [22 June 2020 22:01 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/10 "2020-06-22T22:01:30Z")

</div>

Thank you all for your replies! I've decided that a Raspberry Pi 4 is the device I would like to use for now, since its still very versatile and can run separately from my laptop!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 August 2020 22:01 UTC](https://discourse.nodered.org/t/raspberry-pi-vs-linux-virtual-machine/28577/11 "2020-08-21T22:01:32Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
