Page 1 of 1

How many instances of CMX can one Pi run?

Posted: Sun 07 May 2023 5:32 am
by The Dalek Hunter
I am running three separate instances of CMX. One for my Davis WLL, one for my Ecowitt GW1000B and one for my Ecowitt Wittboy. Each run on a dedicated Raspberry Pi 4b booting from a USB HD. These Pi have no other function. Just wondering if I could run all three instances on one Pi or would it be too much for it to cope with?

Re: How many instances of CMX can one Pi run?

Posted: Sun 07 May 2023 7:59 am
by HansR
I think you can on an RPi4 but I would attach a (bootable) SSD drive iso the SD card to handle and store it all: faster and more secure.

Re: How many instances of CMX can one Pi run?

Posted: Sun 07 May 2023 9:01 am
by The Dalek Hunter
I will give it a go!

Re: How many instances of CMX can one Pi run?

Posted: Sun 07 May 2023 9:03 am
by SamiS
Cpu usage shouldn’t become an issue with Pi4, one instance takes less than 10% cpu if you have ”normal” logging and realtime intervals (in my example 10min/60sec). Of course the cpu usage grows with tighter timings, but how much, that I don’t know. But if your Pi4 has only 2GB of RAM, that could become an issue depending on how much your instances tend to grow on memory usage during runtime. On my setup the process seems to grow to 500-700MB during 3-4 weeks.

One thing to consider is also the fact, that do you want to ”put all eggs in one basket”? I’m running two instances in different Pi’s to prevent losing too much data if one Pi fails for any reason. Of course the risk also depends on your setup, how much you can recover from eg. Ecowitt cloud.

If you want to still improve your storage reliability from usb hdds’ that are usually not desiged to run 24/7/365, I would recommend getting an Argon One case with m.2-ssd base. Previously on original version it supported only m.2 sata ssd:s, but now with v2 of the case you can select between sata- or nvme-compatible expansion board.

Re: How many instances of CMX can one Pi run?

Posted: Sun 07 May 2023 9:13 am
by HansR
Make sure you configure swapsize to 2 times physical RAM that solves a lot of problems.
I believe default is only 100K

Re: How many instances of CMX can one Pi run?

Posted: Sun 07 May 2023 9:17 am
by mcrossley
HansR wrote: Sun 07 May 2023 9:13 am Make sure you configure swapsize to 2 times physical RAM that solves a lot of problems.
I believe default is only 100K
This!

Re: How many instances of CMX can one Pi run?

Posted: Sun 07 May 2023 1:39 pm
by The Dalek Hunter
In the end I decided to go for plan D.

All three instance running on a Mac mini alongside WeatherCat!

Re: How many instances of CMX can one Pi run?

Posted: Mon 08 May 2023 4:51 pm
by philpugh
FWIW I have a PI4 (8GB) running three instances of CMX (plus web servers for each system and another two servers for local groups).

The Pi 4 is averaging well below 10% CPU. It boots from a 128Gb SSD and everything is enclosed in an ARGON case (which has a s/w controlled fan in it).

Re: How many instances of CMX can one Pi run?

Posted: Tue 09 May 2023 8:14 am
by The Dalek Hunter
All three instances running happily on my Mac Mini and all three Pi now released for other projects.

I installed Mono from here https://www.mono-project.com/docs/getti ... stall/mac/

And then just copied all the CMX files across from Pi into /Users/myusername on the Mac

I put the files in three different folders CMXD, CMXE and CMXW

and made sure "stop second instance" was unticked.

I then wrote a little bash script to start CMX

cd /Users/myusername/CumulusMXD
/Library/Frameworks/Mono.framework/Versions/Current/bin/mono CumulusMX.exe -port 8999

With a different port for each. Using this I could start each instance via a terminal.

And the next bit is the bit I am not sure about! To launch on boot I used Automator as here

https://stackoverflow.com/questions/644 ... 25#6445525

and then added the three files produced to the logon items.

All start on boot and all seems be fine but the only way I can stop them is to remove them from login items and reboot.

Is there any other way to achieve this or as it is working should I just leave it?
Could there be any problems using automator to start CMX??