Monday, 10 February 2014

Synology Diskstation Performance Tuning (2)

Synology Diskstation Performance Tuning (1)

Continuing with my ongoing quest for good system performance on my Synology devices, I have more issues to solve: reliable media streaming and performance notifications.

Reliable Media Streaming

I switched from the Plex media server to Synology's Video Station (plus Media Indexer) and the performance was much better. Now, I really like Video Station (and Plex by the way) but Video Station seems to take a long time to pick up new media, and I don't get thumbnail images shown on my LG TV, so, from the shadows, in steps MediaTomb.

I installed Media Tomb, which, so far, has solved both issues, and it's really efficient too, beating Plex and Videostation for performance. As usual, I'm losing lots of features to get better performance but I'm very happy so far: It's fast, efficient, uses little memory, shows thumbnails on my LG TV and in Media House Pro (on Android), and picks up new media instantly - great!

Searching the Net for installing mediatomb on a synology device, I saw some ways to install it directly in the Diskstation using ipkg. I don't like this idea - to me it feels like messing with the device firmware, and it's not something I want to get used to doing. Instead I put mediatomb inside a chroot and ran it from there. If I ever want to delete it I just delete the chroot and then it is completely gone, with no risk of breaking the system or filling up precious system space.

I'll explain how I installed mediatomb on a synology device in another post soon. It's pretty simple.

Performance Notifications

I only want SyNagios to tell me when there's an actual performance issue, not when the system is simply under heavy load. When the system is working hard then load will be high, and this means the diskstation is working correctly, so please Synagios, don't bug me with email notifications!

Getting rid of false positives

To accomplish this, a few existing metrics need to be checked and clustered together to implement the logic in the following table:

Metric Status
Load Average OK HIGH HIGH OK HIGH OK OK HIGH
CPU Usage OK OK HIGH HIGH OK OK HIGH HIGH
Swap Activity OK OK OK HIGH HIGH HIGH OK HIGH
RESULT OK OK OK BAD BAD BAD OK BAD

My first thought was to use the standard nagios check_cluster plugin, but it's not configurable enough to implement the logic shown in the table, but before looking further into implementing the logic, let's first test this logic on a performance problem I have encountered recently.

The screenshot below shows where I tried the Plex media server again on the tiny DS112, and it shows that there was a performance issue that i would want to be notified about.

The graphs show that Plex is too heavy for the tiny DSM112, so I stopped plex midway through it's scan, built a chroot, later installed mediatomb in the chroot, then did a media scan on the same media using mediatomb.

The load is still high, sitting at around 3-4, and there is plenty of cpu usage, but there is no performance problem. Using the table logic from above I would have been notified about Plex, good, but would not been notified about mediatomb doing its scan, or for the load from building the chroot, which is what I want.

Plex versus Mediatomb for the initial media scan on a Diskstation DS112

So now I think I have the theory covered it's time to work out how to do it with synagios.

I'll cover this in Synology Diskstation Performance Tuning (3).

2 comments:

  1. Hey, would really appreciate if you posted on how exactly you installed MediaTomb on your Synology NAS. Thanks

    ReplyDelete
  2. "Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating.php jobs in hyderabad.
    "

    ReplyDelete