Author |
|
phil13 Groupie
Joined: December 19 2004 Location: France
Online Status: Offline Posts: 60
|
Posted: May 06 2005 at 12:43 | IP Logged
|
|
|
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 |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 09 2005 at 15:45 | IP Logged
|
|
|
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 |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: May 10 2005 at 01:11 | IP Logged
|
|
|
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 |
|
|