I'm using makemkv-1.5.8 on 64-bit Gentoo GNU/Linux. When I enable streaming, even before any program reads a stream, the CPU usage jumps to 90% on one of more cores. Granted, this is at the lowest clock setting, but it seems like a waste since it is using up all that CPU basically doing nothing. This happens with both makemkv and makemkvcon. The CPU usage is low when it is scanning/reading the disk. It only jumps up when the http server starts up.
I don't think it always did this. I remember streaming and watching blu-ray with only about 30% CPU usage total and makemkv only contributed a fraction of the total, most of it was used by the video client program. Now, htop tells me that makemkv is chewing up CPU even when it is just idling. I can provide a list of recently updated packages but none of them seem to be related to what makemkv does. They are almost all video output programs and libraries.
Makemkv is a fabulous program IMO. If I end up watching Blu-rays regularly, I will buy a copy in order to support your development work. Thank you for making it so easy to watch Blu-rays on Linux.
makemkv streaming blu-ray chews up CPU (it's back)
makemkv streaming blu-ray chews up CPU (it's back)
Last edited by BitJam2 on Fri Dec 03, 2010 6:15 am, edited 2 times in total.
-
- Posts: 4075
- Joined: Wed Nov 26, 2008 2:26 am
- Contact:
Re: makemkv streaming blu-ray chews up CPU
Please confirm, the cpu is high when you don't access http server? That seems wrong.
Re: makemkv streaming blu-ray chews up CPU
Exactly. On both counts. The cpu is high even when I don't access http server. And this seems wrong.
I just tried it again on a different Blu-ray disc. As soon as makemkvcon says "Streaming server started" the CPU usage of one core jumps to 90% and stays that high until I kill makemkvcon.
To confirm nothing is connected to the makemkv http server here is the output of "sudo netstat -autp | grep mkv":
When a client does connect, a line like this gets added to the output:
I just tried it again on a different Blu-ray disc. As soon as makemkvcon says "Streaming server started" the CPU usage of one core jumps to 90% and stays that high until I kill makemkvcon.
To confirm nothing is connected to the makemkv http server here is the output of "sudo netstat -autp | grep mkv":
Code: Select all
tcp 0 0 *:51000 *:* LISTEN 18145/makemkvcon
udp 0 0 localhost:54163 *:* 18145/makemkvcon
udp 0 0 *:56345 *:* 18145/makemkvcon
udp 0 0 *:1900 *:* 18145/makemkvcon
Code: Select all
tcp 0 0 localhost:51000 localhost:44282 ESTABLISHED 18145/makemkvcon
Re: makemkv streaming blu-ray chews up CPU
The high CPU usage is gone for now. Makemkv in streaming mode with no connections is now only using abut 17% of one core.
I've got no idea why it started using up more CPU and I have no idea why it stopped. I use both Conky and Gkrellm to monitor CPU usage and other resources so I keep a close eye on how much CPU is being used. One clue is that almost all of the makemkv CPU usage is being used by the system not the user. This is true both during the high usage and the normal usage (17% of one core with no connection).
If I see the high CPU usage again I will post again in this thread.
I've got no idea why it started using up more CPU and I have no idea why it stopped. I use both Conky and Gkrellm to monitor CPU usage and other resources so I keep a close eye on how much CPU is being used. One clue is that almost all of the makemkv CPU usage is being used by the system not the user. This is true both during the high usage and the normal usage (17% of one core with no connection).
If I see the high CPU usage again I will post again in this thread.
Re: makemkv streaming blu-ray chews up CPU (gone for now)
Today the makemkv CPU usage in (unconnected) streaming mode is less than 2%.
-
- Posts: 4075
- Joined: Wed Nov 26, 2008 2:26 am
- Contact:
Re: makemkv streaming blu-ray chews up CPU (gone for now)
Could it be that you've launched it from root this time?
Re: makemkv streaming blu-ray chews up CPU (gone for now)
Good question but no, I've always launched it as a normal user. I've probably started steaming about 10 times today. Once the CPU usage went down to 1% or so, it never went back up.
The strange thing ISTM is that the high CPU usage tapered off before going back to close to zero. I had been mucking about installing and upgrading video libraries and players. I was also mucking about with the Nvidia kernel module (trying to get rid of "tearing" *sigh*). It seems possible, perhaps likely, that some of this mucking about contributed to the problem. If so, then I probably won't see it again, or perhaps only see it rarely.
My feeling is that if it happens frequently enough to be annoying then we can probably figure out how to reproduce it and then fix it. Until it then, I'm going to just ignore that it happened.
The strange thing ISTM is that the high CPU usage tapered off before going back to close to zero. I had been mucking about installing and upgrading video libraries and players. I was also mucking about with the Nvidia kernel module (trying to get rid of "tearing" *sigh*). It seems possible, perhaps likely, that some of this mucking about contributed to the problem. If so, then I probably won't see it again, or perhaps only see it rarely.
My feeling is that if it happens frequently enough to be annoying then we can probably figure out how to reproduce it and then fix it. Until it then, I'm going to just ignore that it happened.
Re: makemkv streaming blu-ray chews up CPU (gone for now)
The high CPU usage is back again. It happened yesterday and today watching "The Fellowship of the Ring". Here is the output from "top":
It is not disastrous, just annoying. When I stop streaming the usage goes down to near zero. It looks like it is mostly time spent in the kernel, not userland.
Code: Select all
top - 23:05:25 up 5:17, 6 users, load average: 0.68, 0.34, 0.24
Tasks: 123 total, 1 running, 120 sleeping, 0 stopped, 2 zombie
Cpu(s): 18.0%us, 3.6%sy, 0.5%ni, 76.3%id, 0.5%wa, 0.2%hi, 0.9%si, 0.0%st
Mem: 4061536k total, 1472716k used, 2588820k free, 22536k buffers
Swap: 8008364k total, 0k used, 8008364k free, 373352k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2594 jbowlin 20 0 635m 527m 6624 S 67 13.3 1:10.65 makemkvcon
2639 jbowlin 20 0 693m 164m 51m S 34 4.1 0:38.31 xbmc.bin
6479 root 20 0 143m 55m 17m S 17 1.4 29:24.25 X
3010 jbowlin 20 0 19088 1204 868 R 2 0.0 0:00.01 top
7189 jbowlin 20 0 253m 24m 16m S 2 0.6 1:37.41 gkrellm
1 root 20 0 3888 656 552 S 0 0.0 0:00.52 init