With the hardware you are running on, it might be worth moving to a different database, something external rather than embedded. MySQL/MariaDB and InfluxDB tend to be the most popular. I run with InfluxDB and haven’t had any problems. Migrate your existing persistence data to InfluxDB provides instructions and some scripts that you could use or modify and use to extract the data from your existing db4o and save it to a different database so you wouldn’t lose anything.
I notice that db4o isn’t listed among the official persistence addons so support might be harder to come by as time goes on.