Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: hard disk access Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
phil13
Groupie
Groupie
Avatar

Joined: December 19 2004
Location: France
Online Status: Offline
Posts: 60
Posted: May 06 2005 at 12:43 | IP Logged Quote phil13

Hi,

I want to limit access disk to "rest" my hard disk and i've a question :

I've made some countdown timers with globals variables and timed events.
When i put ON some devices, i initiate a autooff timer value.
Each minute, these timers are descreased by one.
When one of it reach 0, i sent an x10 off command.

If i do that, is powerhome access every minute to the hard disk ?

More globally, how to limit access disk ?

Philippe
Back to Top View phil13's Profile Search for other posts by phil13
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 09 2005 at 15:45 | IP Logged Quote dhoward

Philipe,

It would be difficult to limit hard disk access I believe. Since PowerHome uses a database (Adaptive Server Anywhere) and virtually everything within PowerHome is stored within tables in the database, it would not be easy. Most database systems, while having cache systems, usually write table changes fairly quickly to minimize the possibility of data loss.

To minimize disk access, you'll definately want to minimize the number of events that are logged. You would also want to minimize the code that makes changes to items stored within tables (such as global variables). You may be able to change the code so that instead of using global variables, use the global system variables ([GLOBAL1] thru [GLOBAL20]) since these are stored within memory only.

The other thing you may want to look into is storing the PowerHome database in a RAM drive. Im not sure if Windows includes any free RAM drive utilities, but there should be plenty of third party ones available. By moving the database to a RAM drive, you should be able to almost completely eliminate hard drive access by PowerHome. At the same time, you'll run the risk of losing any data changes made to the database in case of power loss. You could minimize this though by using the ph_backupdb function and periodically writing a copy of the database to hard drive. You would probably have to launch PowerHome using a batch file or similar so that the hard drive copy of the database is copied to the RAM drive just prior to PowerHome being launched and have the pwrhome.ini database file parameter pointed to the RAM drive.

HTH,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 10 2005 at 01:11 | IP Logged Quote krommetje

Why not build a Campact Flash to E-IDE converter and install powerhome on a compact flash drive... I have a CF->EIDE in my PH-server and use a 128mB CF-card as a harddive ( D: ) for testing purposes so that Powerhome has unique diskaccess on the HD ( C:) I know of a project where the author uses a 2gB CF-card to run a windows on. Schematics are easily to obtain on the internet... if I am not mistaken there are also ready and built PCB's for sale... The only disadvantage is that you need a ATA-66 or higher to do this... So on an old style pentium it doesn't work...

Peter
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum