Improve comskip speed on Synology with SSD cache? (Probably not!)

I'm pretty sure the answer to this is a big fat NO. But I'll throw it out there anyway. I am running Channels on a Synology DS918+. I am wondering… If I add SSD read-write cache to the Synology, will that possibly improve the comskip processing speed? My thought is that if the recording is initially written to the SSD cache, then the process of flagging commercials would be faster. Or is this really only dependent on the processor, and SSD cache would not help?

It's CPU bound so faster disk won't help.

1 Like

I suspected that, but just needed confirmation. Thanks!

I suppose you can write a script that checks whether comskip is running, and then renice it to give it a highern priority. Synology's DSM allows you to set arbitrary scripts to run at boot.

Sorry, I'm still kind of a Synology newbie. Can you dumb that down for me?

It's nothing Synology specific; the same will apply to basically any Linux/BSD system. When commands are executed on a computer, they are given a priority value. Processes with higher priorities get first crack at the processor, while processes with lower priorities have to sometimes wait until there's an opening in the queue for the processor's time. On Linux (which is the kernel that powers Synology's DSM), you can use a program called renice to change a processes priority setting while it is running.

What I am proposing is a script that would do a couple of things:

  • Look for any comskip processes that are running, and take note of its PID (process ID).
  • Check this PID against a file or database that the script maintains to see if this is a new comskip process, or if it has already handled the comskip process with that particular PID.
  • If it is a new PID, then renice that particular comskip process to give it higher priority for the processor.

Channels is pretty nice in this manner as it only does commercial detection on one program at a time. However, if too many processes are given higher priorities, you may notice some performance issues related to other aspects of your NAS. (If that is the case, you can always renice the comskip process again to return it to its default priority.

Of course, if this all sounds like Greek to you, perhaps you shouldn't muck around with your NAS's processes and modify things beyond the default. Any modification you do may bring about instability, so caveat emptor. (Of course, that's mostly CYA for my own benefit, but I think you get the gist.)

I would like to eventually add more comskip settings, so you can tell it to run more or less aggressively. For example, use more than one cpu core or run only at night when nothing is recording.

For example, use more than one cpu core or run only at night when nothing is recording.

I know this is an old post, but I can't find any indication if this ever happened? As I'd love a setting to only run comskip when nobody else is accessing the DVR or Plex for example, such that if it did it in the middle of the night instead of right after the recording that would help with the limited resources of even a new DS1019+.