1

I am facing with cpu load issue causing by postgresql server.

Here is top output:

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                   
   8267 postgres  20   0  268508   4816    868 S 160.0  0.1   4785:37 x3307700177                                                                                                               
      1 root      20   0   43296   3120   1852 S   0.0  0.1   0:52.91 systemd    

Can somebody explain what is the that weird process and what can be done for decreasing cpu usage by that process? I've tried to find out what that process is but no luck, google told me nothing.

PostgreSQL-9.2.23

Thanks in advance

Vao Tsun
  • 47,234
  • 13
  • 100
  • 132
  • 1
    if it takes a while, can you `select query from pg_stat_activity where pid = 8267` – Vao Tsun Nov 26 '17 at 20:06
  • @VaoTsun `postgres=# SELECT query FROM pg_stat_activity WHERE pid=8267; query ------- (0 rows) ` – D. Ovchinnikov Nov 26 '17 at 20:24
  • 1
    Check out if that is a child of the postmaster (via the `PPID`). Judging from the name, I'd say it isn't (unless you have an extension installed that starts background worker processes with such a weird name). Use `lsof` to see what executable it is and what files it accesses. Use `strace` to figure out what it is doing. – Laurenz Albe Nov 26 '17 at 20:29
  • PPID=PID and x3307700177 is executable by itself. `strace -p 8267 strace: Process 8267 attached epoll_wait(14, [], 1024, 179) = 0 epoll_wait(14, [], 1024, 90) = 0 epoll_wait(14, [], 1024, 500) = 0 epoll_wait(14, [], 1024, 301) = 0` lsof showed that 14 is `x33077001 8267 postgres 14u a_inode 0,9 0 5983 [eventpoll]` – D. Ovchinnikov Nov 26 '17 at 20:47
  • so what was it? some bitcoin calculation? did youfind out? – Vao Tsun Nov 27 '17 at 08:44
  • @VaoTsun Unfortunately It is still unknown for me what that process is and how to deal with it. – D. Ovchinnikov Nov 27 '17 at 08:53
  • did you at least `sudo find / -name x3307700177` as sudo user?.. – Vao Tsun Nov 27 '17 at 08:57
  • @VaoTsun It has been located in postgres data directory. Finally i've upgraded to 10.1 version and that solved the issue. – D. Ovchinnikov Nov 29 '17 at 10:15

0 Answers0