TOS 5 Big Process "postgres" ( SQL ) CPU HIGH

Permissions, domain/LDAP, power, security, notification and more.
Locked
User avatar
gretor
Posts: 44
Joined: 23 Dec 2021, 19:43

TOS 5 Big Process "postgres" ( SQL ) CPU HIGH

Post by gretor »

I installed TOS 5 and after I installed Terra Search, the CPU was continuously spinning at 100%. Since I read that this is still a bug, I uninstalled the APP. Since the CPU load did not change, I decided to reinstall TOS 5.

Unfortunately, this also shows a CPU that is completely overloaded from the beginning. For some reason the postgres process is running at full load all the time, taking away the CPU's breathing room and using up an enormous amount of system resources. The Terra Master is therefore difficult to use.

Is this a known bug ? What is the reason ? Can I fight the problem via SSH without compromising the NAS privacy ?

gretor

>Name User ID CPU Memory
postgres postgres 10354 6.61% 0.72%
postgres postgres 10266 6.03% 0.71%
postgres postgres 10267 6.02% 0.71%
postgres postgres 10268 5.77% 0.71%
postgres postgres 10269 5.77% 0.72%
postgres postgres 10221 5.54% 0.72%
postgres postgres 10215 4.96% 0.71%
postgres postgres 10214 4.61% 0.71%
postgres postgres 10209 4.17% 0.71%
postgres postgres 10460 31.11% 0.72%
postgres postgres 10208 3.87% 0.71%
TOSDaemon TOS-Qosmio 4757 3.13% 3.82%
postgres postgres 10186 2.77% 0.71%
postgres postgres 10185 2.66% 0.72%
postgres postgres 10459 15.68% 0.72%
postgres postgres 10166 1.94% 0.71%
postgres postgres 10172 1.88% 0.71%
[restart_service] TOS-Qosmio 2730 1.60% 0.41%
postgres postgres 10164 1.45% 0.71%
postgres postgres 10149 1.43% 0.72%
postgres postgres 10139 1.20% 0.71%
postgres postgres 10124 1.18% 0.71%
TNAS F2-221 - TOS 5
4 GB Ram
2x 4 TB WD Red - Raid 1
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: TOS 5 Big Process "postgrel" ( SQL ) CPU HIGH

Post by TMroy »

I would like to respond to all topics related to process "postgres":

1. From TOS 5, a new database postgres has been implemented into the system, there are a lot of services and apps that need to read or write the database. So if you see many "postgres" processes running, please do NOT be surprised, it is a normal case.

2. Because it is reading and writing the database, each "postgres" process will occupy a very small CPU resource and each process will automatically exit after a short period of time.

3. If you find that one or some "postgress" processes take up a lot of CPU resources(over 50%) for a long time(over 30 minutes), it is possible that these processes are stuck for some reason. If this happens, you can export the process list and send it to us for analysis.
exportlist.png
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
titanrx8
Posts: 222
Joined: 17 Jul 2020, 06:17

Re: TOS 5 Big Process "postgres" ( SQL ) CPU HIGH

Post by titanrx8 »

Based on TM comments on the postgres CPU consumption in another thread, I did some checking.

When I log in as a user with admin privileges, the CPU consumption will hit 100% for days non-stop. There will be 69 postgres processes with consumption as high as 45% for one of the instances (and it doesn't disappear after 30 minutes).

If I log out of that user and log in as the super-user, the CPU consumption will be nominal and there will be 15 instances of postgres but none of the instances exceeds 1%. The system is responsive and usable.

Here's my question. Which accounts are we supposed to use? I thought that we were supposed to create admin privilege users and log in using that user instead of the superuser in order to safeguard against ransomware. But, when I login using the admin privilege user, the system becomes totally unresponsive because of the 100% CPU.

This is f2-221 currently on 5.0.144
User avatar
TMroy
TerraMaster Team
Posts: 2578
Joined: 10 Mar 2020, 14:04
China

Re: TOS 5 Big Process "postgres" ( SQL ) CPU HIGH

Post by TMroy »

{L_BUTTON_AT}titanrx8
Thank you for your report! We have found the cause of the issue, it will be fixed in near future updates.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
titanrx8
Posts: 222
Joined: 17 Jul 2020, 06:17

Re: TOS 5 Big Process "postgres" ( SQL ) CPU HIGH

Post by titanrx8 »

@tmroy
Another observation: it seems that every new user that gets created will have Media Indexing enabled by default which also kicks off heavy cpu consumption. For my purposes, Media Index is not needed on this backup system so I need to remember to disable media indexing if I create any more users.
chourmovs
Posts: 27
Joined: 28 Mar 2020, 14:56

Re: TOS 5 Big Process "postgres" ( SQL ) CPU HIGH

Post by chourmovs »

titanrx8 wrote: 02 Aug 2022, 06:27 @tmroy
Another observation: it seems that every new user that gets created will have Media Indexing enabled by default which also kicks off heavy cpu consumption. For my purposes, Media Index is not needed on this backup system so I need to remember to disable media indexing if I create any more users.
Confirming and agreeing for Both PostgreSQL make things sluggish and media indexing could be disabled by default
TNas F2-220
User avatar
Dadbart
Posts: 2
Joined: 05 Sep 2022, 02:54

Re: TOS 5 Big Process "postgres" ( SQL ) CPU HIGH

Post by Dadbart »

I also have the issue with mediaindex running away with the CPU. I don't use Multimedia Server (I use Plex) or photos, so I disabled it and the CPU returned to 2-3%. Running latest stable release 5.0.163. Not fixed yet it appears. It did say the Index had completed a day previous to today. I just updated to 5 yesterday.
Locked