PDA

View Full Version : Mezzmo MediaServer CPU - anyway to calm it down?



fletch
07-14-2017, 02:34 AM
I've activated and looked at the logs for the server since I have regular issues with it constantly hanging on to 5-8% of the CPU for no apparent reason. I noticed it's polling/answering my dozen or so web cams. Got to wondering if there was a way to have the server stop looking/interacting with things that it doesn't need to interact with.

One amazing fact, when I shutdown the server just now, it added just over 40,000 log entries before gracefully shutting down. Looks like 3 repeating lines.

9721656 - Jul 13 07:55:26.245 [ThreadID:eb44] - [EB44] INFO > Destroy: sem_destroy (185)
9721657 - Jul 13 07:55:26.245 [ThreadID:eb44] - [EB44] INFO > Destroy: sem_destroy done(187)
9721658 - Jul 13 07:55:26.245 [ThreadID:eb44] - [EB44] INFO > Destroy: PendingSend_Head: 0 (170)
9721659 - Jul 13 07:55:26.245 [ThreadID:eb44] - [EB44] INFO > Destroy: sem_destroy (185)
9721660 - Jul 13 07:55:26.245 [ThreadID:eb44] - [EB44] INFO > Destroy: sem_destroy done(187)
9721661 - Jul 13 07:55:26.245 [ThreadID:eb44] - [EB44] INFO > Destroy: PendingSend_Head: 0 (170)
9721662 - Jul 13 07:55:26.246 [ThreadID:eb44] - [EB44] INFO > Destroy: sem_destroy (185)
9721663 - Jul 13 07:55:26.246 [ThreadID:eb44] - [EB44] INFO > Destroy: sem_destroy done(187)
...

Here's another snippet...a regular block of 200 lines like this. As I tailed the log, after polling the cameras it would spew this out, then go back to polling the cameras. Now for all I know, the cameras could me messing with Mezzmo by broadcasting hello packets.

9714709 - Jul 13 07:51:23.671 [ThreadID:eb44] - [EB44] > ---------------------------------------------------------------------
9714710 - Jul 13 07:51:23.850 [ThreadID:eb44] - [EB44] INFO > EB44 fd_counts: readset = 10, writeset = 0, errorset = 8, tv_sec = 532, tv_usec = 763000, slct = 0, v = 532763
9714711 - Jul 13 07:51:23.912 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714712 - Jul 13 07:51:23.913 [ThreadID:eab4] - [EAB4] INFO > EAB4 fd_counts: readset = 7, writeset = 0, errorset = 8, tv_sec = 376, tv_usec = 933000, slct = 0, v = 376933
9714713 - Jul 13 07:51:24.350 [ThreadID:eb44] - [EB44] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714714 - Jul 13 07:51:24.413 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714715 - Jul 13 07:51:24.415 [ThreadID:eab4] - [EAB4] INFO > EAB4 fd_counts: readset = 7, writeset = 0, errorset = 8, tv_sec = 376, tv_usec = 432000, slct = 0, v = 376432
9714716 - Jul 13 07:51:24.531 [ThreadID:eb44] - [EB44] INFO > EB44 fd_counts: readset = 10, writeset = 0, errorset = 8, tv_sec = 532, tv_usec = 84000, slct = 0, v = 532084
9714717 - Jul 13 07:51:24.915 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714718 - Jul 13 07:51:24.916 [ThreadID:eab4] - [EAB4] INFO > EAB4 fd_counts: readset = 7, writeset = 0, errorset = 8, tv_sec = 375, tv_usec = 930000, slct = 0, v = 375930
9714719 - Jul 13 07:51:25.031 [ThreadID:eb44] - [EB44] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714720 - Jul 13 07:51:25.208 [ThreadID:eb44] - [EB44] INFO > EB44 fd_counts: readset = 10, writeset = 0, errorset = 8, tv_sec = 531, tv_usec = 403000, slct = 0, v = 531403
9714721 - Jul 13 07:51:25.416 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714722 - Jul 13 07:51:25.417 [ThreadID:eab4] - [EAB4] INFO > EAB4 fd_counts: readset = 7, writeset = 0, errorset = 8, tv_sec = 375, tv_usec = 429000, slct = 0, v = 375429
9714723 - Jul 13 07:51:25.708 [ThreadID:eb44] - [EB44] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714724 - Jul 13 07:51:25.884 [ThreadID:eb44] - [EB44] INFO > EB44 fd_counts: readset = 10, writeset = 0, errorset = 8, tv_sec = 530, tv_usec = 727000, slct = 0, v = 530727
9714725 - Jul 13 07:51:25.917 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714726 - Jul 13 07:51:25.918 [ThreadID:eab4] - [EAB4] INFO > EAB4 fd_counts: readset = 7, writeset = 0, errorset = 8, tv_sec = 374, tv_usec = 928000, slct = 0, v = 374928
9714727 - Jul 13 07:51:26.384 [ThreadID:eb44] - [EB44] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714728 - Jul 13 07:51:26.418 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714729 - Jul 13 07:51:26.420 [ThreadID:eab4] - [EAB4] INFO > EAB4 fd_counts: readset = 7, writeset = 0, errorset = 8, tv_sec = 374, tv_usec = 427000, slct = 0, v = 374427
9714730 - Jul 13 07:51:26.562 [ThreadID:eb44] - [EB44] INFO > EB44 fd_counts: readset = 10, writeset = 0, errorset = 8, tv_sec = 530, tv_usec = 51000, slct = 0, v = 530051
9714731 - Jul 13 07:51:26.920 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714732 - Jul 13 07:51:26.921 [ThreadID:eab4] - [EAB4] INFO > EAB4 fd_counts: readset = 7, writeset = 0, errorset = 8, tv_sec = 373, tv_usec = 925000, slct = 0, v = 373925
9714733 - Jul 13 07:51:27.062 [ThreadID:eb44] - [EB44] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714734 - Jul 13 07:51:27.239 [ThreadID:eb44] - [EB44] INFO > EB44 fd_counts: readset = 10, writeset = 0, errorset = 8, tv_sec = 529, tv_usec = 372000, slct = 0, v = 529372
9714735 - Jul 13 07:51:27.421 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714736 - Jul 13 07:51:27.422 [ThreadID:eab4] - [EAB4] INFO > EAB4 fd_counts: readset = 7, writeset = 0, errorset = 8, tv_sec = 373, tv_usec = 424000, slct = 0, v = 373424
9714737 - Jul 13 07:51:27.739 [ThreadID:eb44] - [EB44] WARN > select timed out with tv_sec = 0 and tv_usec = 500000
9714738 - Jul 13 07:51:27.918 [ThreadID:eb44] - [EB44] INFO > EB44 fd_counts: readset = 10, writeset = 0, errorset = 8, tv_sec = 528, tv_usec = 695000, slct = 0, v = 528695
9714739 - Jul 13 07:51:27.922 [ThreadID:eab4] - [EAB4] WARN > select timed out with tv_sec = 0 and tv_usec = 500000

Peter
07-17-2017, 10:00 AM
If your cameras have UPnP enabled then this would cause them to send Notify messages over the network and Mezzmo will receive these and respond so you could try disabling UPnP on the cameras if possible.

fletch
07-17-2017, 03:08 PM
I did that on day one - many years ago. But I did just find another setting I'm turning off that controls whether the cameras appear in Window Explorer. The ones in the log had that enabled.

So what do you make of the log entries above? Just normal diagnostic info that spews out when the server is idle?

The 40,000 entries when terminating the server. Is that normal?

Peter
07-17-2017, 04:01 PM
The lines from terminating the server are messages that had not been sent yet to devices on the network so this is normal when there are a lot of devices on the network communicating. The other grouping of log lines is normal, just the server listening for incoming messages.

fletch
07-18-2017, 11:50 AM
Given a 1.6Gb log file, what sorts of things would you search for to reveal clues? During the 5-8% consumption period the only thing showing in the logs were the cameras and that block of "normal" stuff which you described as the server listening for incoming messages. So if that's all the log revealed while the server was consuming 5-8%, there's something the logs aren't seeing that is causing the load?

Peter
07-18-2017, 01:19 PM
Can you please post the excerpt of the log with the cameras log lines?

If you add the log to a zip and send it to support [at] conceiva [dot] com we can have a look to see if we can find anything that might cause the load.