home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
Improvement Suggestions
Use FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE for time shift files
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Andy_2639" data-source="post: 1296408" data-attributes="member: 161048"><p><strong>Started on:</strong> 2023-12-26</p><p><strong>last update:</strong> 2023-12-26</p><p></p><p><strong>Summary:</strong></p><p>Minimize the amount of data written to disk by simulating a tempfs RAM disk on Windows via file open attributes</p><ul> <li data-xf-list-type="ul">FILE_ATTRIBUTE_TEMPORARY</li> <li data-xf-list-type="ul">FILE_FLAG_DELETE_ON_CLOSE</li> </ul><p></p><p><strong>Area:</strong></p><p>TVServer</p><p></p><p><strong>Description:</strong></p><p>Time shift files are just used temporary. As they can take quite some space, virtual memory (im my case 16 GB RAM + 32 GB swapfile) is most likely to small. So they have to be written on disk (current situation). Windows can "simulate a RAM disk" by opening/creating the time shift files with the attributes</p><ul> <li data-xf-list-type="ul">FILE_ATTRIBUTE_TEMPORARY</li> <li data-xf-list-type="ul">FILE_FLAG_DELETE_ON_CLOSE</li> </ul><p>Such files are written to disk only if necessary (Windows and its memory management take care of it).</p><p></p><p>The advantage is that the disk/SSD has less written data and thus less wear and less power consumption.</p><p></p><p>I don't know whether this flags are available from C#. I don't know how the flags behave when the file is opened multiple times (TVServer writing it and TVServer reading it (RTSP) or MediaPortal client reading it).</p><p></p><p>[URL unfurl="true"]https://en.wikipedia.org/wiki/List_of_RAM_drive_software#Native[/URL]</p><p></p><p>I don't know the MediaPortal source code, so usage of this flags might be already the case.</p></blockquote><p></p>
[QUOTE="Andy_2639, post: 1296408, member: 161048"] [B]Started on:[/B] 2023-12-26 [B]last update:[/B] 2023-12-26 [B]Summary:[/B] Minimize the amount of data written to disk by simulating a tempfs RAM disk on Windows via file open attributes [LIST] [*]FILE_ATTRIBUTE_TEMPORARY [*]FILE_FLAG_DELETE_ON_CLOSE [/LIST] [B]Area:[/B] TVServer [B]Description:[/B] Time shift files are just used temporary. As they can take quite some space, virtual memory (im my case 16 GB RAM + 32 GB swapfile) is most likely to small. So they have to be written on disk (current situation). Windows can "simulate a RAM disk" by opening/creating the time shift files with the attributes [LIST] [*]FILE_ATTRIBUTE_TEMPORARY [*]FILE_FLAG_DELETE_ON_CLOSE [/LIST] Such files are written to disk only if necessary (Windows and its memory management take care of it). The advantage is that the disk/SSD has less written data and thus less wear and less power consumption. I don't know whether this flags are available from C#. I don't know how the flags behave when the file is opened multiple times (TVServer writing it and TVServer reading it (RTSP) or MediaPortal client reading it). [URL unfurl="true"]https://en.wikipedia.org/wiki/List_of_RAM_drive_software#Native[/URL] I don't know the MediaPortal source code, so usage of this flags might be already the case. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Use FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE for time shift files
Contact us
RSS
Top
Bottom