Speeding up HG?

I’ve noticed one of my HG machines starting to load and execute things slower. This machine I use to test and create HG programs on.
So my question is how can I get the speed back?
I realize disabling programs I don’t use should help. As well cleaning up modules not use should help. Is there anything else that can be done?
I thought a defrag may help but I’m using HG on a Pi and from searching that topic I see a defrag wouldn’t help a SD card.

I will watch as I have had times of slow down - I think.

I believe speed is also determined by SD card speed capability, right? So could your SD card have slowed down due to age or something?

Yes the SD card capabilities can affect speed. Age I don’t believe is so much a factor. I did create a couple of programs to free up space and memory on the SD card and that does make a bit of improvement. However I’m more interested in what can be done in HG.
Although I’ve been informed the HG module clean up isn’t 100% reliable (buggy I believe was the term) using it does help. In fact I used it to remove all modules not just those in use and then restarted the HG service. The load time did improve somewhat.

You know, I just noticed last week that in all my loading, making backups, etc., etc., ALL my scheduler & program items were active. Most I do not use. So I spent 15 minutes disabling each program not used and deleting my scheduler items no longer used. I did NOT delete the 50 or schedule items listing solar day of the year etc stuff: wonder if deleting the ones not used would speed stuff up too…

Run htop from the cli to see what processes are being used.

That shows me Mono Homegenie and Java Ha-Bridge are running but for every one HA-Bridge entry I have maybe 20 homegenie entries.
For better insight it might be better to stop Homegenie service then go to the HG folder and run mono HomeGenie.exe and watch what HG is loading and running

My HG to has been slow to load but I never realized it could be HG related until reading your post. I deleted all unused modules and re started HG and my HG now starts right up quickly.

I believe there are loads of things you can do in HG to speed things up.these are a few that worked for me.
1:Disabling logging and only use that when needed.
2:Disable and remove any program not inuse or needed.
3:Flush you modules to remove thouse you may have tried but removed from groups.
4:Delete the X10securityrf file this will get regenerated with x10 rf which you only use now.
5: Disable & remove (if possible) interfaces not in use.
6: Don’t use backgrounds for your groups.
7: keep groups small (dont have all modules in one group)
8: purge log files

I’m sure there are more things you can do in HG and will add to this as I try them if i notice any improvement.

As for things other then HG on a Pi
1:Do what @Petediscrete suggests and stop anything that is running and isn’t required.
In the raspi-config
1:disable the desktop if loading
2: In advaced settings make sure you have expanded the file system.
3: make sure your memory split for the GPU is set to 16
Outside raspi-config
1: clean up left over files from upgrades and package installs
sudo apt-get clean && sudo sudo apt-get autoremove -y
2: free up unused memory
sudo sysctl vm.drop_caches=1 && sudo sysctl vm.drop_caches=2 && sudo sysctl vm.drop_caches=3 && sync
3: if your still running Stretch consider upgrading to Buster (it realy is faster)
4: Pi boards are low power devices and anything additional plugged into it can be stealing power so we need to limit those things A pi Zero W only has one USb port unless you add a header or multiport. I found there is a way to turn off the power going to the HDMI port If your running headless you don’t need that.
5: Consider using a USB stick or USB SSD I doubt the SSD will be any better as it is limited to the speed a USB port can supply. However @Petediscrete can go into the way he done it(not sure if he is using a ZeroW with the SSD)
Here’s how you would do a USB stick (I’ve not tried this yet)
http://oskarhane.com/basic-raspberry-pi-setup-with-raspbian/

Where is it? I searched HG directory for “x10security” and found nothing.

Pete suggests:

3: make sure your memory split for the GPU is set to 16

Where is that set? I do not find it in raspi-config?

Thanks.

Stop the HG server. Open up another terminal and manually launch HG. You will see the startup report that hg x10 Security folder cannot be found.

Memory sharing is in the raspi-config under advanced settings if I remember correctly.
I know I run mine at the lowest as I don’t tun the desktop.

my raspi-config does not have the cpu mem set option. But I checked it with:

vcgencmd get_mem gpu

And it is set to 64mb. I also found no x10rf folder (I do not know how to stop and restart HG).

sudo systemctl stop homegenie.service

sudo systemctl start homegenie.service

To run HG manually do the following

sudo systemctl stop homegenie.service

cd /usr/local/bin/homegenie

sudo mono HomeGenie.exe

Once you’ve finished running HG manually press the Ctrl-C keys to exit

Interesting but not sure what it tells me:

I’ve still no clue what this x10rf thing is all about?

FREAKIN GREAT!!!

FOLLOWING THE ABOVE 3 POSTS LABOTIMIZED MY HG AGAIN!!! ALL X10 NAMES, SECURITY DATA, EVEN MY F DEGREE CHANGES TO OPENWEATHER GONE!!!

now this wont post either…

And I assume you’re backing up all along the way as you have been advised before tinkering around.

There’s nothing in the instructions I gave you that would cause any break in your install assuming you followed them as I posted.

The error mentioned in the log relates to the blacklisting of ATI Remote drivers to allow the CM19 Driver to load correctly and has no effect on your setup.

The gpu can be ajusted several ways


Since you can’t find the setting in taspi-config try one of the other methods

This is an old thread, but I have been working on a lot of topics recently and as a result of these I have learned some things about expectations with the RPi. No matter what you do with your settings, the only thing that will truly make a difference in speed is…getting a faster system. The RPi1 is not fast and was never intended to be so. Running HG with anything else is going to cripple it. Unless you update your HW to at least a RPi2 or even better an RPi3, you will simply run out of resources. Even booting is significantly faster with the RPi3 over the RPi1 HW. For more information about the various RPi options, check out the wikipedia page.

Of significance to many what I’ve been reading of other people’s setups on the X10 forum, many opted to use the RPiZW. While this has a smaller form factor and built-in WiFi, it is stuck with the same HW as the RPi1. It is simply not enough power. And the newer OS is choices isn’t doing it any favors.

I speak from experience that has been hard learned. You certainly can make the old system run, but it’s not going to be anything more than that and stability will be compromised. My testing setup now is my original RPi1 currently running Node Red, Grafana, and a few other things and it really can’t handle it. As soon as the boat gets here, it’s getting shelved!