|
SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
ZFS rocks for SageTV!
So, I just installed a new combination home workstation / sagetv server with 16GB RAM, 3x Hitiachi "green" 3TB drives. My old server had 4GB, 3x 750GB WD "green" drives.
The big problem that I had was that the stupid linux page caching algorithms always decided last nights ~20-30Gb of recordings were more important than my mailer, my web browser, my X11 server, and everything else. So in the morning, it would take ~90 seconds to page in everything I cared about. I tried running with no swap, I tried setting vm.swappiness to every value imaginable, but no joy. Running without swap would occasionally lead to the OOM killer nuking my web browser if I had to start up a VM during the workday, and none of the swappiness settings had any impact. Back in the old days, DEC OSF/1 (later Tru64) had a tunable (ubc.maxpercent) that would limit the amount of RAM that could be used as a disk cache. You could set this to something like 25, and never have to worry about the kind of problem I was having. Enter ZFS... On my new system, I'm using native ZFS (from http://zfsonlinux.org/ via the PPA on that page) for my /home and for video / recording directories. With ZFS, you can do cool stuff like: 1) Limit the cache size 2) Disallow file and/or metadata caching on a per fs basis 3) Use an SSD to make a huge cache. In case anybody is interested, I did the following non-default things: 1) limited ARC (zfs page cache) to 4GB via this line in /etc/modprobe.d/zfs.conf options zfs zfs_arc_max=4294967296 zfs_vdev_cache_size=536870912 2) disallowed the video files from being stored in the page cache via: zfs set primarycache=metadata tank/video zfs set secondarycache=metadata tank/video 3) configured a small 32GB SSD as an L2ARC (secondary page cache): My config looks like: # zpool status pool: tank state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 sdb ONLINE 0 0 0 sdc ONLINE 0 0 0 sdd ONLINE 0 0 0 cache sda3 ONLINE 0 0 0 errors: No known data errors # zfs list NAME USED AVAIL REFER MOUNTPOINT tank 2.03T 3.30T 7.08G /tank tank/home 185G 4.11T 185G /home tank/video 1.02T 3.30T 1.02T /video After recording 2 NFL games and a movie this afternoon (well more than the 16GB RAM in the box), the machine is still as snappy as ever, and has over 6GB free (~5GB used by ZFS, ~5GB used by everything else) Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64 Tuner HW: HDHR Client: Nvidia Shield (HD300, HD100 in storage) |
#2
|
||||
|
||||
You wanna hear something that might be depressing to you.... I've been recording 4-5 programs continuously on a windows server to NTFS drives, with 3GB RAM, for many years, and have never had a problem with using a web browser at the same time...
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#3
|
|||
|
|||
Quote:
Assuming ZFS didn't work, I was planning to switch SageTV to a VM with raw access to drives. Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64 Tuner HW: HDHR Client: Nvidia Shield (HD300, HD100 in storage) |
#4
|
||||
|
||||
I've been running a couple of years on linux, and I can't say that I've any memory issues. I've only ever recorded 2 HD shows at the same time.
I tried zfs a few years and I had huge performance issues, so I now use linux raid and it's been pretty good... although I miss the features of zfs If you are saying that zfs is really fast, I might switch back. Something you could have tried as well, is tuning the "swapiness" kernel variable so that the system doesn't swap very often. One of the things with windows (and linux to a certain extent) is that is really wants to move stuff out into swap even if there is lots of ram available. I haven't set this on my server but on my laptop, it made a huge difference when I was running running multiple vmware sessions, eclipse, lotus notes, browsers, etc, and only had 3 gigs of memory.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#5
|
||||
|
||||
Quote:
3+ years on windows xp 32 bit sp3 with 4 GB of ram 3.5 gb usable of course...never had a problem like that before. I reguarly record 3+ hd shows without a hitch. |
#6
|
|||
|
|||
I've recently added a HDHR Prime which updated me to 5 HD tuners. Thus far I've been able to record HD from all of them (the Prime uses MythTV as a backend because I'm having issues getting it to work properly in Sage) simultaneously while watching 1 HD feed on a HD200.
This is a system with a Athlon 64 X2 4200+ CPU (a whopping 2.2GHz) and 2.5G of RAM running CentOS 6 (64-bit). The OS runs in a ext3 partition, but my video storage uses XFS. I currently have swap disabled, and "free" is telling me I have 1.3GB cached. Admittedly, I typically don't run X (run only in mode 3), but it does run Sage, MythTV, Apache, Samba, and MySQL. |
#7
|
|||
|
|||
Quote:
With 3 days under my belt, native ZFS seems blindingly fast so far. For raidz-1 with a tiny SSD l2-arc, I'm seeing 210MB/sec reads and 160MB/sec writes. Quote:
Back when I had to hack sagetv with an LD_PRELOAD to fix some dvb issues, I was thinking to try to add an LD_PRELOAD of open() to make it so that an open of any .mpg would get the O_DIRECT flag OR'rd in.. But that would have meant a native comskip (didn't feel up to hacking wine).. Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64 Tuner HW: HDHR Client: Nvidia Shield (HD300, HD100 in storage) |
#8
|
||||
|
||||
It was zfs under fuse... there wasn't a native zfs for unbuntu at the time that I tried it.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#9
|
|||
|
|||
Quote:
Code:
-------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU nol2arc 20480 130721 99.2 150756 9.7 84240 12.3 109947 76.4 183958 18.8 140.0 1.2 l2arc 20480 129911 99.2 149446 9.7 87720 9.8 140813 94.6 211060 11.1 596.2 3.0
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64 Tuner HW: HDHR Client: Nvidia Shield (HD300, HD100 in storage) |
#10
|
||||
|
||||
This is great news! I was told by a buddie that ZFS was only availible by going through FUSE. After looking at the site, I was a little thrown off by seeing that the "0.5.2 stable release does not yet support a mountable filesystem". What and how do I even process that? Are you using, 0.6.0-rc5 release candidate?
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 |
#11
|
|||
|
|||
Quote:
I'm running it on the Ubuntu 11.10 "oneiric" beta. I'd really wanted to use CentOS 6, as I don't want to have to re-install the machine for a while. But the ZFS package for CentOS does not get automatically rebuilt after a kernel update, so I was worried that I'd run into issues with a kernel update. And Ubuntu 10.04 does not support TRIM for SSD, so I was boxed into running something 'new' .. so I chose the latest short-term Ubuntu. Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64 Tuner HW: HDHR Client: Nvidia Shield (HD300, HD100 in storage) |
#12
|
||||
|
||||
Quote:
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 |
#13
|
||||
|
||||
Quote:
thx /jer
__________________
AMD Ryzen 7 1700 w/ SageTV Server Linux V9.1.8.774 - Ubuntu 16.04LTS AMD64 -- 1x HDHomeRun Prime -- 1x HDHR-DT -- 1x HD-PVR 2x SageTV HD-300 Media Extenders 1x NVIDIA ShieldTV |
#14
|
|||
|
|||
Quote:
+1 to this. I was under the impression HDHR Prime (that's the CableCard version, right?) only worked with Windows Media Center.
__________________
Current Server: Sage v7.1.9.1 beta w/ Diamond UI on Ubuntu 11.10 x86_64 | Storage: Linux md's raid10,f2 | Client: HD300 extender | Tuner: HDHomeRun for QAM |
#15
|
||||
|
||||
Quote:
thx /jer
__________________
AMD Ryzen 7 1700 w/ SageTV Server Linux V9.1.8.774 - Ubuntu 16.04LTS AMD64 -- 1x HDHomeRun Prime -- 1x HDHR-DT -- 1x HD-PVR 2x SageTV HD-300 Media Extenders 1x NVIDIA ShieldTV |
#16
|
|||
|
|||
That what I am hoping to try and resolve. The directions for SageDCT seem to be pretty basic for Windows, but I'm having trouble getting it to function properly using a Linux server. I don't have any previous experience with SageDCT, so it could easily be a config issue on my end.
|
#17
|
|||
|
|||
Quote:
I installed FreeNAS 8.x, opened up Samba to everyone and gave it a quick test, no problems but I wanted to look at some other distros. I also used unRAID for a while with 3 drives in the "free version" again no real problems but I felt limited to what I could do with it, ditto for FreeNAS. I was going to use Mint LDXE but they were forcing me to use either Firefox or Epiphany (forces "Mint search credits" I suppose), no restrictions with Lubuntu and it installs Chrome by default, which I wanted. I have a nice Conkey panel set up that shows everything I need at a glance, from power to drive space. I'm not 100% this is my final system, but it has worked well now for a couple weeks after I weeded out some initial glitches. LXDE versions are fairly stripped and I only had to delete about 5-10 unwanted apps for a lean/clean setup, only using 144MB of RAM now on the desktop with Conky running. Uptime has been 6 days now, but it's not seen any use other than testing, and converting one ts movie to a MKV, until I get my new SageTV box working between recordings for max WAF, can't miss NFL games either for HAF. First SageTV on Vista test failed because I moved my Vista hard drive to a new PC using sysprep. It looked ok but old IDs were still there, not new ones created, SageTV 7 on Vista was using local, couldn't map to the Linux RAID, tuners were wonky, etc. I did a reinstall from within Vista, reactivated, and it seems happy now. Using 3GB file size to exceed any caches with Iozone iozone -s 3G /media/long RAID ID string/Documents/iozone.dat read speed is 457.1MB/s, reread is 473.0MB/s write speed is 195.3MB/s, rewrite is 195.8MB/s
__________________
6/23/2012 updated with spare parts - SageTV 7.1.9 WHS 2011: Gigabyte H55M-S2H, i3-550, 8GB Gskill Sniper RAM, WD320GB Scorpio OS drive, 6 Samsung 2TB drives, FSP Aurum Gold 400W PSU, reused Antec Lanboy case (idle 34W - undervolted). Snapraid 1.9 parity Clients: 3 HD200 Sources: HDHomerun OTA, HD-PVR to Comcast Cisco RNG150 via USB-UIRT Other: Denon AVR-2310CI, Panasonic 50" & 42" 720p plasmas, HSU sub, ancient Klipsch fronts + Polk surrounds Last edited by najames; 09-15-2011 at 07:35 PM. |
#18
|
|||
|
|||
Quote:
Quote:
FWIW, in my machine with a 17GB file (16GB RAM), I see this from IOzone: read speed is 1,169MB/s, re-read is 1195MB,s write speed is 506MB/s, re-write 117MB/s. Interesting affects from the SSD cache Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64 Tuner HW: HDHR Client: Nvidia Shield (HD300, HD100 in storage) |
#19
|
|||
|
|||
Sidetrack, my harder configuration of Linux works, but the "easy Vista 64 server" is kicking my butt and it doesn't feel good.
No recordings were scheduled so I stayed up late last night to get SageTV 7 working, (HDHomerun + HDPVR & USB-UIRT). About 1am it all worked great from the HD200, scheduled recordings and went to bed. This morning the extender said there were no cotton pickin servers. Grrrr. I came in to check it and it was stuck on a black screen saying something like win.loader failed. There was over 21,000 lines of crap in system logs, reinstalling from scratch again now. Maybe time to call Bill Gates tomorrow.
__________________
6/23/2012 updated with spare parts - SageTV 7.1.9 WHS 2011: Gigabyte H55M-S2H, i3-550, 8GB Gskill Sniper RAM, WD320GB Scorpio OS drive, 6 Samsung 2TB drives, FSP Aurum Gold 400W PSU, reused Antec Lanboy case (idle 34W - undervolted). Snapraid 1.9 parity Clients: 3 HD200 Sources: HDHomerun OTA, HD-PVR to Comcast Cisco RNG150 via USB-UIRT Other: Denon AVR-2310CI, Panasonic 50" & 42" 720p plasmas, HSU sub, ancient Klipsch fronts + Polk surrounds |
#20
|
||||
|
||||
Quote:
Andy was very helpful while i tried to sort out the DCT installation on Windows. Probably the most confusing bit is that you have to have Windows Firewall _on_ for the RTP stream to be processed properly. This is the case both in XP and Win7 (DCT works fine for me in both), although in XP at least i needed to disable the firewall in order for the DCT setup utility to "scan" for the HDHR Prime initially. YMMV. /jer
__________________
AMD Ryzen 7 1700 w/ SageTV Server Linux V9.1.8.774 - Ubuntu 16.04LTS AMD64 -- 1x HDHomeRun Prime -- 1x HDHR-DT -- 1x HD-PVR 2x SageTV HD-300 Media Extenders 1x NVIDIA ShieldTV |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PHOENIX ROCKS - THX | macsupergeek | Phoenix | 1 | 09-06-2011 11:22 PM |
SAGETV 7 rocks - moving to this solution after being with WMC for years | jkellynewyork | SageTV Software | 4 | 02-01-2011 07:19 PM |
IR is as stupid as a box of rocks | flavius | SageTV Software | 7 | 01-16-2008 12:03 PM |
HD Extender rocks! | mogrinz | SageTV Media Extender | 1 | 01-01-2008 11:23 AM |
RF Remote Rocks | glbrown | Hardware Support | 6 | 02-05-2005 06:10 AM |