Jump to content

Assessing Efficiency of Solution Options


f11

Recommended Posts

Is there any way to assess which of several optional ways of programming a solution (folders, programs, flags or links, scenes, wait, repeat, etc) is the most efficient from a particular perspective: least used memory; or fastest execution; or least CPU loading; and so on?

 

I find myself trying to weigh the advantages of several ways to do a particular task, but then wondering how I can do it most efficiently.

 

Also, is there a memory model of the ISY-99i that can be shared, to give us some idea of what's available for programming and what's available for data? I realize I have no tools to adjust these boundaries, but knowing where they are (and being able to determine what resources are still available) might help those tackling large systems approach the task more methodically.

 

Perhaps this is a waste of effort with a "black box" like the ISY, but the question has been nagging at me, so I thought I may as well ask.

 

Rod

Link to comment

Rod,

 

I'm by no means the most qualified to answer your concerns, but I do share them. To that end, let me add an additional metric to your list - unnecessary powerline activity. Coming from the X10 world, I'm keenly attuned to this.

 

There are a number of tools built into the ISY-26. I'm making the rash assumption that the 99i shares these same tools. Using these tools can give you an idea of memory consumption, and total links:

 

Telnet to ISY shell: ISY Advanced Configuration Guide

 

Commands:

  • SM: show memory utilization
    scan z: lists known links -
Scenes Create Additional Links Thread

These can help evaluate the "efficiency" of your code.

 

Optimization of the various parameters (memory, cpu utilization, execution speed, powerline activity) is most likely contradictory and is based on personal preference and your installation.

 

I have been focusing on CPU utilization (availability of the ISY to respond to events in a timely fashion) and powerline activity (I view this as reliability and responsiveness). Others will have different requirements (execution speed).

 

For my purposes, I have found that creating folders for timed events works well. Grouping a series of programs under a single "time qualified folder" appears to lighten the load on the ISY (you're evaluating a single condition rather than many). This does not imply speed, it may in fact take a given program longer to execute, but rather lower overhead and increased overall responsiveness.

 

The use of "status" conditions can lead to both high overhead and unnecessary powerline communication. The following is an example:

 

Program 1: KPL status monitor

If

            Status  'Bar Cans' > Off
         Or Status  'Bar Lamp' > Off
         Or Status  'Dinette' > Off
         Or Status  'Fam Wall KPL1-Primary' > Off
         Or Status  'Fam Fan' > Off
         Or Status  'Family Room LampLinc' > Off
         Or Status  'Family Room Lamplinc' > Off
         Or Status  'Fireplace Spots' > Off
         Or Status  'Foyer' > Off
         Or Status  'Kitchen Cans' > Off

Then
       Wait  1 second
       Set Scene '1st Floor Status On' On

Else
  - No Actions - (To add one, press 'Action')

 

Program 2: Qualified Status Monitor

If
   Status  'Master KPL 1st FL' is Off
    and
       (
            Status  'Bar Cans' > Off
         Or Status  'Bar Lamp' > Off
         Or Status  'Dinette' > Off
         Or Status  'Fam Wall KPL1-Primary' > Off
         Or Status  'Fam Fan' > Off
         Or Status  'Family Room LampLinc' > Off
         Or Status  'Family Room Lamplinc' > Off
         Or Status  'Fireplace Spots' > Off
         Or Status  'Foyer' > Off
         Or Status  'Kitchen Cans' > Off
       )


Then
       Wait  1 second
       Set Scene '1st Floor Status On' On

Else
  - No Actions - (To add one, press 'Action')

 

Program 1 will execute anytime one of the units in the "or" condition changes state. This can result in multiple "on" commands being sent when the overall condition is already true (unnecessary overhead and powerline traffic). Extend this concept to a "dim" and things get a bit ugly.

 

Program 2 qualifies the "or" and doesn't execute the program if it is already "true" (Master KPL status is already on).

 

That's my limited take on programming and execution flow. Others will have different end goals. Bottom line is we are both still learning (I've had my ISY for roughly 1.5 months). I've gotten a lot of excellent feedback from the ISY guys and forum members by posting code and have changed my programming accordingly.

 

My $0.02,

IM

Link to comment

IndyMike,

 

Thanks so very much for your post and most valuable information contained therein.

 

Rod,

 

ISY-26 and 99 share the same amount of flash=512K

ISY-26 has 2MB RAM

ISY-99 has 8MB RAM depending on the build

 

As IndyMike suggested, you can use SM to figure out how much memory is currently being utilized but we do not yet have any utilities to measure the processor's utilization. Since ISY is a multi-tasking/event driven environment, the efficiency of the programs depend on the amount of information on the reader task (X10/Insteon) and the amount of information needed to be processed. All tasks have priorities; if you are interested, I can share with you the tasks and their priorities.

 

With kind regards,

Michel

 

 

Is there any way to assess which of several optional ways of programming a solution (folders, programs, flags or links, scenes, wait, repeat, etc) is the most efficient from a particular perspective: least used memory; or fastest execution; or least CPU loading; and so on?

 

I find myself trying to weigh the advantages of several ways to do a particular task, but then wondering how I can do it most efficiently.

 

Also, is there a memory model of the ISY-99i that can be shared, to give us some idea of what's available for programming and what's available for data? I realize I have no tools to adjust these boundaries, but knowing where they are (and being able to determine what resources are still available) might help those tackling large systems approach the task more methodically.

 

Perhaps this is a waste of effort with a "black box" like the ISY, but the question has been nagging at me, so I thought I may as well ask.

 

Rod

Link to comment

IndyMike,

 

Thanks so very much for your post and most valuable information contained therein.

 

Rod,

 

ISY-26 and 99 share the same amount of flash=512K

ISY-26 has 2MB RAM

ISY-99 has 8MB RAM

 

As IndyMike suggested, you can use SM to figure out how much memory is currently being utilized but we do not yet have any utilities to measure the processor's utilization. Since ISY is a multi-tasking/event driven environment, the efficiency of the programs depend on the amount of information on the reader task (X10/Insteon) and the amount of information needed to be processed. All tasks have priorities; if you are interested, I can share with you the tasks and their priorities.

 

With kind regards,

Michel

 

 

Is there any way to assess which of several optional ways of programming a solution (folders, programs, flags or links, scenes, wait, repeat, etc) is the most efficient from a particular perspective: least used memory; or fastest execution; or least CPU loading; and so on?

 

I find myself trying to weigh the advantages of several ways to do a particular task, but then wondering how I can do it most efficiently.

 

Also, is there a memory model of the ISY-99i that can be shared, to give us some idea of what's available for programming and what's available for data? I realize I have no tools to adjust these boundaries, but knowing where they are (and being able to determine what resources are still available) might help those tackling large systems approach the task more methodically.

 

Perhaps this is a waste of effort with a "black box" like the ISY, but the question has been nagging at me, so I thought I may as well ask.

 

Rod

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...