Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

General thoughts

"Performance" depends on the type of application. In general, performance is separated into "throughput" and "delay". Applications like data logging tend to required high throughput, wereas voice type application a short delay time require.

Delay considerations

The Avisaro 2.0 system contains a multitasking architecture. The TCP/IP Stack, WLAN driver and BASIC Scripting run in separate tasks. The multitasking has two different modes:

  1. Time sliced mode: Each task gets a defined timeslot assigned. That is independent of whether the task has something to do or not. As a result, the system is very predictable how it reacts to input.
  2. Work load mode: Each task gives up comuting resources as soon as there is nothing to do. To avoid a blocking system, there is a maximum time of 20ms for each task. As a result, the system reacts more dynamically to the inputs but is less predictable. 

Time Slice Mode

Use the command "sched" (Mehr more ) to configure the length of the timeslot each task should be given. A value of 20 ms ("sched 50" : 1sec/50 = 20ms)  is a goog starting point.

Work Load Mode

Use the command "sched" (Mehr more ) to switch on the Work Load Mode ("sched 0").

It is advised to tell the BASIC Script when to give up computing resources. This is done with the command "sleep 0". Typically this command is inserted after sending a data packet :

   repeat_put:
   put 201, C, BYTESREAD
   if LASTERR <> 0 then
      sleep 0
      goto repeat_put
   end if

There is a 'safety net' - if no sleep 0 is used, every about 20ms the BASIC Scripting task is switched anyway. This is to avoid a 'hanging' system: If BASIC would not free computing resources to the TCP/IP task, no network traffic could be done.

The overall result is a system with short delay times.

Windows PC: Delayed Ack

When running a Windows PC, there is problem called "Delayed Ack". See Mehr here  for details.

Throughput considerations

Stay tuned ... will be discussed later.