Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Preload files to memory
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Preload files to memory
5th Jan, 2013, 06:41 AM
Post: #1
namtih Offline
Tester
Posts: 269
Joined: Dec 2012
Reputation: 28
Preload files to memory
I want to share a little modification, which brought the biggest improvement in overall handling for me until now. The idea was to automatically preload some important files to the memory after the system startup - like for example the databases.

Someone called it "a poor man's trick" as I only cat the files. So here it is:
1. nano /etc/rc.local
2. Insert before "exit 0"
Code:
#make an empty file to check if the commands were executed
touch /run/xstart_`date +%F_%T`
#preload database files (about 10mb for me)
cat /home/xbian/.xbmc/userdata/Database/*.db > /dev/null
#preload commoncache plugin if installed
cat /home/xbian/.xbmc/userdata/addon_data/script.common.plugin.cache/commoncache.db > /dev/null
#preload python files for youtube-plugin
cat /home/xbian/.xbmc/addons/plugin.video.youtube/*.py > /dev/null
cat /home/xbian/.xbmc/addons/plugin.video.youtube/*.pyc > /dev/null
#another empty file to check if all commands were executed and how long it took
touch /run/xstop_`date +%F_%T`
3. Do a reboot
4. check if the "xstart*" and "xstop*" got generated
Code:
ls -al /run/x*

As I said, the system feels much smoother while browsing through the lists, infoarts and addons. Hope you will also feel an improvement.

What could be other files worth preloading?
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Messages In This Thread
Preload files to memory - namtih - 5th Jan, 2013 06:41 AM
RE: Preload files to memory - CurlyMo - 5th Jan, 2013, 06:44 AM
RE: Preload files to memory - namtih - 5th Jan, 2013, 10:32 PM
RE: Preload files to memory - namtih - 6th Jan, 2013, 04:16 AM
RE: Preload files to memory - CurlyMo - 6th Jan, 2013, 05:40 AM
RE: Preload files to memory - namtih - 6th Jan, 2013, 08:19 PM
RE: Preload files to memory - CurlyMo - 6th Jan, 2013, 08:32 PM
RE: Preload files to memory - namtih - 6th Jan, 2013, 09:57 PM
RE: Preload files to memory - CurlyMo - 6th Jan, 2013, 10:02 PM
RE: Preload files to memory - raspberry_pd - 7th Jan, 2013, 03:19 PM
RE: Preload files to memory - namtih - 7th Jan, 2013, 07:50 PM
RE: Preload files to memory - raspberry_pd - 8th Jan, 2013, 02:59 PM
RE: Preload files to memory - namtih - 8th Jan, 2013, 09:58 PM
RE: Preload files to memory - brantje - 8th Jan, 2013, 11:24 PM
RE: Preload files to memory - namtih - 9th Jan, 2013, 12:36 AM
RE: Preload files to memory - CurlyMo - 8th Jan, 2013, 11:30 PM

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 23rd May, 2025, 11:58 PM Powered By MyBB, © 2002-2025 MyBB Group.