SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-10-2011, 10:11 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
Put Sage Server on Ramdisk

First of all I want to thank Fuzzy for pointing me to Dataram and also giving me the Idea to use my extra ram.

Not for the faint of Heart

Requires you autologon in windows
I came up with this process because in the event of a powerfailure etc.. Your wiz.bin file can be corrupted. Using the process below your wiz.bin will always be in good condition even after a powerfailure while writing to it. It will simply load the last good image.. you will only lose the last 5 minutes.

Dataram Ramdisk itself backups the image but has one glaring flaw. If you lose power when it is creating the image upon reboot it will load the bad image and you will be left with a bad RamDisk. I tested this on my test machine by having Ramdisk write an image and powered down while writing... upon reboot had no ramdisk.

I am used to teaching users step by step so you techies might think its too much info..

Using the ramdisk your Sagetv Server will be loaded in memory including you wiz.bin.


1. Install Ramdisk
2. Setup Ramdisk (See Screen cap Ramdisksettings and Ramdiskloadsave) save settings and Start it.
3. Set Drive Letter to your likeing (administrative tools computer management)
4. Start up ramdisk GUI if not running click on load save tab and save disk image now.
5. Run InitialBKImg batch Job. This creates a backup which you will use in ramdisk under load disk image at startup
6. Goto to Ramdisk settings select load image at startup and choose the backup image in my sample its c:\RAMDiskB.img save settings close down ramdisk.
7. reboot
8. Bring up your DatRam Utility this is a good time to make sure it's loading your backup if Ramdisk did not start just start it.
9. Now you can check on my Computer and make sure the drive letter and size of your ramdisk is correct.

If it is you are good to go.

Run Batch job StartBKUPImg. This will start the automatic backup minimized and belownormal. A new image will be created every 5 minutes.

Now comes to good part.
If you are moving Sage Server to the Ramsdisk. I prefer making a copy of the wiz.bin. Uninstalling Sage. Then reinstall to the ramdisk and copy over the wiz.bin. If you choose to copy over the whole SAGETV directory(not Recommeded) you have to change the drive letters in the sage properties.


Install to the New Ramdisk when I install Sage I simply change the Drive leter in the install directorys.. see CAP (sageinstall). Replace wiz.bin. Setup Sage.

One thing that might have to be changed is in the registry sage points to a common directory which may or may not change with the install.
[HKEY_LOCAL_MACHINE\SOFTWARE\Frey Technologies\Common]
"IRTunerPluginsDir"="C:\\Program Files\\SageTV\\Common"
I changed mine to R because that is my ramdisk.
[HKEY_LOCAL_MACHINE\SOFTWARE\Frey Technologies\Common]
"IRTunerPluginsDir"="R:\\Program Files\\SageTV\\Common"


Finally Add StartBKUPImg to startup at logon in task scheduler.
I also have a rebootServer and shutdownserver batch that will shutdown sage wait for a good image and restart the server. I completely removed logoff and powerdown from my start menu (windows XP).(no more oops)

You are all done you now have a fail proof Sage Server.

InitialBKImg
Code:
set bkupfoder=q:\datarambkup
if not exist "%bkupfoder%" md "%bkupfoder%"
:loop
move c:\RAMDisk.img c:\
set checkuse=%ERRORLEVEL%
if %checkuse% NEQ 0 goto loop
move /Y c:\RAMDisk.img c:\RAMDiskB.img
exit
StartBKUPImg
Code:
start /BELOWNORMAL /MIN C:\BKUPImg.bat
BKUPImg
Code:
c:\tools\sleep.exe 360
set bkupfoder=q:\datarambkup
if not exist "%bkupfoder%" md "%bkupfoder%"
:loop
move c:\RAMDisk.img c:\
set checkuse=%ERRORLEVEL%
if %checkuse% NEQ 0 c:\tools\sleep.exe 60
if %checkuse% NEQ 0 goto loop
move /Y c:\RAMDisk.img c:\RAMDiskB.img
rem if exist "c:\RAMDiskB.img" copy /Y "c:\RAMDiskB.img" "%bkupfoder%\RAMDiskB.img"
cmd /c echo F | xcopy /Y "c:\RAMDiskB.img" "%bkupfoder%\RAMDiskB.img"
set checkxcopy=%ERRORLEVEL%
echo %checkxcopy%
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB5.img" move /Y "%bkupfoder%\RAMDiskB5.img" "%bkupfoder%\RAMDiskB6.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB4.img" move /Y "%bkupfoder%\RAMDiskB4.img" "%bkupfoder%\RAMDiskB5.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB3.img" move /Y "%bkupfoder%\RAMDiskB3.img" "%bkupfoder%\RAMDiskB4.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB2.img" move /Y "%bkupfoder%\RAMDiskB2.img" "%bkupfoder%\RAMDiskB3.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB1.img" move /Y "%bkupfoder%\RAMDiskB1.img" "%bkupfoder%\RAMDiskB2.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB.img" move /Y "%bkupfoder%\RAMDiskB.img" "%bkupfoder%\RAMDiskB1.img"
rem C:\namedate\NAMEDATE /C /Y /T /S:"q:\temp" /XZ:"Ymd-H-M-S" "c:\RAMDiskB.img"
goto loop
rebootServer
Code:
net stop SageTV
R:\tools\process -q SageTV.exe
R:\tools\process -q SageTVclient.exe
set bkupfoder=q:\datarambkup
if not exist "%bkupfoder%" md "%bkupfoder%"
:loop
echo "reboot" > r:\temp\reboot.txt
move c:\RAMDisk.img c:\
set checkuse=%ERRORLEVEL%
rem if %checkuse% NEQ 0 r:\tools\sleep.exe 60
if %checkuse% NEQ 0 goto loop
move /Y c:\RAMDisk.img c:\RAMDiskB.img
rem if exist "c:\RAMDiskB.img" copy /Y "c:\RAMDiskB.img" "%bkupfoder%\RAMDiskB.img"
cmd /c echo F | xcopy /Y "c:\RAMDiskB.img" "%bkupfoder%\RAMDiskB.img"
set checkxcopy=%ERRORLEVEL%
echo %checkxcopy%
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB5.img" move /Y "%bkupfoder%\RAMDiskB5.img" "%bkupfoder%\RAMDiskB6.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB4.img" move /Y "%bkupfoder%\RAMDiskB4.img" "%bkupfoder%\RAMDiskB5.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB3.img" move /Y "%bkupfoder%\RAMDiskB3.img" "%bkupfoder%\RAMDiskB4.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB2.img" move /Y "%bkupfoder%\RAMDiskB2.img" "%bkupfoder%\RAMDiskB3.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB1.img" move /Y "%bkupfoder%\RAMDiskB1.img" "%bkupfoder%\RAMDiskB2.img"
If %checkxcopy% EQU 0 if exist "%bkupfoder%\RAMDiskB.img" move /Y "%bkupfoder%\RAMDiskB.img" "%bkupfoder%\RAMDiskB1.img"
start shutdown -m \\%COMPUTERNAME%  -r -f -t 5
exit
Attached Images
File Type: jpg ramdiskloadimage.JPG (46.9 KB, 127 views)
File Type: jpg Ramdiskloadsave.JPG (46.7 KB, 112 views)
File Type: jpg RamdiskSettings.JPG (44.6 KB, 117 views)
File Type: jpg sageinstall.JPG (42.0 KB, 114 views)
Attached Files
File Type: zip tools.zip (85.6 KB, 71 views)
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.

Last edited by nyplayer; 10-10-2011 at 02:17 PM.
Reply With Quote
  #2  
Old 10-10-2011, 04:27 PM
korben_dallas's Avatar
korben_dallas korben_dallas is offline
Sage Icon
 
Join Date: Oct 2004
Location: USA
Posts: 1,250
Aside from the 5 minute old backup, what is the benefit here?

Seems like a lot of trouble vs. puting SageTV into a VM.
__________________
SageTV server & client: Win 10 Pro x64, Intel DH67CF, Core i5 2405s, 8 GB ram, Intel HD 3000, 40GB SSD system, 4TB storage, 2x HD PVR component + optical audio, USB-UIRT 2 zones + remote hack, Logitech Harmony One, HDMI output to Sony receiver with native Intel bitstreaming
Reply With Quote
  #3  
Old 10-10-2011, 04:52 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
Its not a lot of trouble. like I said setup is not for the faint of heart... It is an unattended server.. self backing up... access in my Clients is very fast since Sage resides in memory. I put it out there .. use it if you want... or don't. Took me 1/2 hour to move my server to ram-disk hardly any trouble.
Also when I use the server to watch shows the GUI flys since it is already in memory.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.

Last edited by nyplayer; 10-10-2011 at 04:59 PM.
Reply With Quote
  #4  
Old 10-10-2011, 05:21 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,186
Is it actually faster than off a hard drive? I ask because of two things, I thought sage basically ran out of memory anyway (only accessing the disk to update the wiz.bin and properties files), and second, because I moved my Sage to a much more powerful machine and installed to an SSD and didn't really notice a performance difference.
Reply With Quote
  #5  
Old 10-10-2011, 05:36 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
Stranger
Video thumbnails ... etc.... will reside in memory and be generated in memory. Transition of menus is instantaneous. This is meant for older systems where buying extra Memory is cheaper than upgrading drives to SSD etc....
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.

Last edited by nyplayer; 10-10-2011 at 05:39 PM.
Reply With Quote
  #6  
Old 10-10-2011, 06:27 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
I'm not sure I'd do this on a server. There are better products that are geared towards RAM caching. The Ramdisk is better for static data that never changes (or changes infrequently). The only thing that ever changes on my client install is when I change configurations, but I do that rarely, and launch an image backup manually when I get it how I like it. (I'm not using the auto-backup feature). For the server, which can make changes VERY often (everytime you start or stop watching something, there are database entries made), I'd prefer a RAM based write through or write-delayed cache. (something like SuperSpeed's SuperCache in MirrorMode). It's not a free product through. The RAMDisk does make my i3 client SCREAM through fanart heave screens. They scroll/update faster than the repeat rate on my remote control, actually. I use synctoy to cache my server's fanart folder periodically.
__________________
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

Last edited by Fuzzy; 10-10-2011 at 06:34 PM.
Reply With Quote
  #7  
Old 10-10-2011, 07:57 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
Come on Fuzzy Sage is not being developed anymore so I am bored don't give me any more Ideas
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #8  
Old 12-22-2011, 10:17 AM
HittR HittR is offline
New Member
 
Join Date: Sep 2010
Posts: 4
What if Sage Directory is greater than 1GB??

I take it if my SageTV directory is greater than 1 GB in size I can't follow the directions above...correct?
Reply With Quote
  #9  
Old 12-23-2011, 07:09 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by HittR View Post
I take it if my SageTV directory is greater than 1 GB in size I can't follow the directions above...correct?
Not sure why being larger than 1GB would matter. The free RAMDisk product can create a single disk, up to 4GB in size. However, like I said, the fully RAMDisk method isn't ideal for the server. For that, the SuperCache method is best.
__________________
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
Reply With Quote
  #10  
Old 12-23-2011, 08:37 PM
Skybolt's Avatar
Skybolt Skybolt is offline
Sage Icon
 
Join Date: Aug 2006
Location: Annapolis, MD
Posts: 1,027
Quote:
Originally Posted by Fuzzy View Post
... the SuperCache method is best.
Yep, it screams! Works awesome on non server os's

I am using 2008R2 so the new version won't install ...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sage server and Playon server on same machine srothwell SageTV Software 4 07-27-2009 01:24 PM
WHS Sage Server access to shares on another server rmac321 SageTV Software 23 03-11-2009 07:20 PM
Sage TV for Windows Home Server Software, HPMediaSmart Server, and HD homerun tuners c309 SageTV Software 15 08-17-2008 06:03 AM
How can I utilize a ramdisk? AboveUnrefined SageTV Linux 5 02-01-2006 06:18 PM
Sage Web Server and existing web server compatibilty? Brent94Z SageTV Customizations 6 01-18-2005 11:29 AM


All times are GMT -6. The time now is 11:32 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.