hi,
since i begin to use synced media, my Plex process is stuck at 100% cpu.
with perf stat
on the pid :
Performance counter stats for process id '622':
24421.340126 task-clock (msec) # 1.002 CPUs utilized [100.00%]
1,184 context-switches # 0.048 K/sec [100.00%]
385 cpu-migrations # 0.016 K/sec [100.00%]
21,906 page-faults # 0.897 K/sec
63,016,549,403 cycles # 2.580 GHz [100.00%]
35,304,634,747 stalled-cycles-frontend # 56.02% frontend cycles idle [100.00%]
18,738,327,756 stalled-cycles-backend # 29.74% backend cycles idle [100.00%]
70,899,826,503 instructions # 1.13 insns per cycle
# 0.50 stalled cycles per insn [100.00%]
12,706,458,767 branches # 520.301 M/sec [100.00%]
240,640,156 branch-misses # 1.89% of all branches
24.379558780 seconds time elapsed
a strace on the process show a massive acces to the /etc/localtime :
here the summary :
# timeout 10s strace -p 622 -f 2>&1 | grep -o 'stat("/etc/localtime' > /tmp/stat ; wc -l /tmp/stat
Terminated
54028 /tmp/stat
it is over 5000 stat() per second only on this ressource
again with perf
, collecting during 10 seconds :
# timeout 10s perf record -p 622 -s
[ perf record: Woken up 6 times to write data ]
[ perf record: Captured and wrote 1.684 MB perf.data (~73587 samples) ]
root@fatboy:~# perf report --stdio
Failed to open /usr/lib/plexmediaserver/Plex, continuing without symbols
# To display the perf.data header info, please use --header/--header-only options.
#
# Samples: 3K of event 'cycles'
# Event count (approx.): 81722598301
#
# Children Self Command Shared Object
# ........ ........ ............... ......................... .............................................................................................................................................
#
64.29% 0.00% Plex Media Serv [unknown] [.] 0x00007f094e0ad180
|
--- 0x7f094e0ad180
62.92% 0.00% Plex Media Serv libsoci_core.so.3.0.0 [.] soci::details::once_temp_type::~once_temp_type()
|
--- soci::details::once_temp_type::~once_temp_type()
|
|--99.76%-- 0x75af45
| 0x7f094e0ad180
--0.24%-- [...]
62.85% 0.00% Plex Media Serv libsoci_core.so.3.0.0 [.] soci::details::ref_counted_statement_base::dec_ref()
|
--- soci::details::ref_counted_statement_base::dec_ref()
soci::details::once_temp_type::~once_temp_type()
|
|--99.76%-- 0x75af45
| 0x7f094e0ad180
--0.24%-- [...]
62.80% 0.03% Plex Media Serv Plex [.] 0x000000000035af45
|
--- 0x75af45
0x7f094e0ad180
62.53% 0.03% Plex Media Serv libsoci_core.so.3.0.0 [.] soci::details::ref_counted_statement::final_action()
|
--- soci::details::ref_counted_statement::final_action()
|
|--99.95%-- soci::details::ref_counted_statement_base::dec_ref()
| soci::details::once_temp_type::~once_temp_type()
| |
| |--99.76%-- 0x75af45
| | 0x7f094e0ad180
| --0.24%-- [...]
--0.05%-- [...]
29.24% 0.03% Plex Media Serv libsoci_core.so.3.0.0 [.] soci::details::statement_impl::prepare(std::string const&, soci::details::statement_type)
|
--- soci::details::statement_impl::prepare(std::string const&, soci::details::statement_type)
|
|--99.33%-- soci::statement::prepare(std::string const&, soci::details::statement_type)
| soci::details::ref_counted_statement::final_action()
| soci::details::ref_counted_statement_base::dec_ref()
| soci::details::once_temp_type::~once_temp_type()
| |
| |--99.89%-- 0x75af45
| | 0x7f094e0ad180
i have 20 threads continuously hammering 1 of my core.
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
# uname -r
3.16.0-4-amd64
did you ever seen this ?
what can i do ?
regards