How to improve performance?

Hello,

I run the latest git clone of tt-rss on a share hosting environment (modified Debian-Linux). Performance is getting slower & slower (loading the pages, browser & internet connection is fine), I guess because too many other users use the shared hosting system as well.

I run it with PHP 7.4 and a mysql 5.5. The database is ~500MB big, I’ve been running it for a long time without problems. Purge is set to 100 days.

Now I am thinking of switching from the shared hosting to a dedicated host, either own machine or VPS or something like this.

What do I need so that the performance will be good?

Will I need a lot of RAM or more CPU? Will faster CPUs be better or more cores? How is tt-rss handling these, or is is all up to PHP? Lots of forks with own threads or in in one big thread?

Did someone manage to get a good performance from a dedicted raspberry pi or is this way too low performance?

Thanks for your help in advance,
Hans

PS: Or do you have any other hints how to increase performance again? Maybe even on the shared hosting system?

Don’t use a Raspberry Pi. If you go with VPS/VDS then even a lower end machine will be fine if TT-RSS is the only thing running on it. You can probably get something around $5 USD a month that will handle your instance. Most of the machines I see at that price point run on SSDs and have 512 MB - 1 GB of RAM.

Here is a thread with recommendations from other users here (these are not officially endorsed, just what other people here use successfully):

https://community.tt-rss.org/t/vps-hosting-recommendations/2861

If you migrate to a VPS, please do the world a favor and make sure you harden your server; there are tons of tutorials online about it. Also use the time as an opportunity to switch over to PostreSQL from MySQL.

If you want a solution without moving hosts, consider lowering the purge days so the database is a bit smaller.

Thanks for the fast reply.

I was thinking of moving to the smallest VPS which has 1 vCore CPU, 512MB RAM an 10 GB SSD. SSD is well enough, but is 1 core & 512 ok? Price would be very cheap, 1 Euro/month. 2 cores and 2GB would cost 10 Euro a month, so then I might have to look for another provider.

Any idea on how tt-rss or php will handle the cores? Will it use multi-core? I will just have tt-rss on the server, that is why I ask.

Also: Why will PostreSQL be faster than MySQL? Or less resource consuming?

And I will reduce the purge to 50 days, let’s see if that makes a difference.

Performance depends on a variety of factors and no one here can give you a definitive answer.

A 1 EUR/month machine seems pretty cheap. I’d be concerned you’d have a lot of neighbours using it (i.e. one dedicated server with hundreds of VPSs) and that shared resources would be constrained. While your disk and RAM might be dedicated, you still share disk IO, network, CPU, etc. with other VPSs on the server.

If you’re the only user on your install your needs should be quite modest. A machine with a single core should be fine. I don’t really feel TT-RSS uses a lot of CPU, a fast disk and RAM will make the difference because it’s pretty database heavy.

PostreSQL is a better. I know MySQL is more popular, but such is life. :man_shrugging: TT-RSS was also designed with PostgreSQL in mind and MySQL support was added later. Having used TT-RSS with both I can attest PostgreSQL is faster.

  1. definitely postgres, forget about mysql.

  2. i would suggest at least two cores, the difference is going to be tangible, on a single core you’re going to notice when feeds update in background or postgres is doing vacuuming.

  3. more ram, which is probably a dual core vds tier going to have anyway.

innodb is slow and likes to eat RAM.

pgsql out of the box settings are really conservative wrt resource usage, at least on debian.

Thanks for the feedback.

I reduced the purge to 30 days on the shared hosting, and it is going a lot smoother again. Really a big difference.

So I guess the bottleneck was the “big” database. Too big for shared hosting I guess.

@JustAMacUser good hint with the database heavy system, as this really seems to be the bottleneck here.

@fox: You are absolutely right, one core for tt-rss could be enoiugh, but of course backround processes will also use CPU e.g. feed update. So 2 cores will be the minimum.

Now I also understand the difference with PostgresSQL and MySQL - I will try to change this as well to see if my system runs better with the less resource hungry database system. I’m just not sure if it is possible to use PgSQL on the shared hosting I’m using, need to check.

Anyway, thanks a lot, the answers really helped me to understand the system and possible performance bottlenecks better.

This might be of use…

https://community.tt-rss.org/t/vps-hosting-recommendations/2861/2