Very Slow

Hi!

I have and ignition server V 7.5.6 installed on a Linux(debian). Intel xeon processor with 4GB RAM.
I have configured the system to connect to 5 PLC each supplies 160 tags via modbus on TCP.
When i open the project on the client side, it takes a lot of time to refresh. I had to increase the device time out to 3000.
I also have an easy chart , when i right click it, it takes a lot of time to display the options and lot of time for selection.
The flashing interval for an object was set to 1 second, but it takes 3-4 seconds to flash and sometimes much more.
I increased the java heap size to 1536 MB as suggested by the manual, but that hasn’t solved the problem.
when i run the following command
$ top
I get a CPU usage in the server under java as 35 - 40 % and RAM usage 11.1 %
in the client i get CPU usage between 60 - 70% and RAM usage of around 30%

when i close the project and run the above command. CPU usage decrease in the Server to 4%.
Looking forward to a solution.

This doesn’t sound right at all. I can tell you that this is not normal, as we have many many customers on 7.5.6 without this performance issue.

Perhaps something in your project is configured poorly and doing something too much? What is your client poll rate set to? Running queries quickly? The other idea is that perhaps your OS is not using hardware accelerated graphics? I’d look into it being a configuration issue first though.

In the OPC UA setting i changed the device poll rate to 500 msec and this solved the Tag time out problem.
I also suspect my project, but i can’t figure out what is wrong. :frowning:
The client poll rate is set to 100msec.
I had a script which runs every 3 seconds. The function of the script is to check the value of the tags and count the number of tags greater than some particular value. There are 5 such scripts. When i disable these scripts, then the speeds improves considerably. But i really can"t understand, why would a script cause such a big problem.
I can give whatever diagnostic information is required, to solve the problem.
Looking forward to a solution.

[quote=“Viggi”]In the OPC UA setting i changed the device poll rate to 500 msec and this solved the Tag time out problem.
I also suspect my project, but i can’t figure out what is wrong. :frowning:
The client poll rate is set to 100msec.
I had a script which runs every 3 seconds. The function of the script is to check the value of the tags and count the number of tags greater than some particular value. There are 5 such scripts. When i disable these scripts, then the speeds improves considerably. But i really can"t understand, why would a script cause such a big problem.
I can give whatever diagnostic information is required, to solve the problem.
Looking forward to a solution.[/quote]

which scripting call are you using to get your tag values? how many tags? maybe just post the scripts that you are running.

Why have you changed the defaults? For example, you changed the default client poll rate to make it poll 10x per second instead of 4x per second. Did you not think this would affect performance?

We cannot answer why your scripts are slowing things down unless you show them to us.

in the previous post, i accidentally provided wrong information about the client poll rate.Sorry! .
It was 250 ms by default.
I changed it to 750 ms and that too didn’t improve the speed.
I changed the default from 100ms to 500 ms in OPC UA device setting to prevent tag time out. I had developed the project in version 7.4.2 and have uploaded the project in this version. (7.5.6)
The script is given below:

def fun(No) import system temp = range(1,151) count = 0 for i in range(len(temp)): if system.tag.getTagValue("No%i/tank %i/For_Alarm"%(No,temp[i])) == 4 or system.tag.getTagValue("No%i/tank %i/For_Alarm"%(No,temp[i])) == 3 and system.tag.getTagValue("No%i/tank %i/Appear"%(No,temp[i])) == 0 : count =count + 1 return count

For Alarm and Appear are memory tags, there are 150 tank tags per PLC and there are 5 PLCs

i run this script every three seconds and have bound it to a numeric label as shown below

runScript("app.check.func("+{Root Container.Number}+"), 3000)

There are 5 such numeric labels on the first page,
The script does not return an error, however , if i delete the numeric labels related to these scripts then the performance improves.

Please suggest any setting changes that i need to do and try.
Looking forward to a solution

you should look at using system.tag.readAll. using that scripting function will allow you to grab all of the tag values in one call. then you can loop thru and filter out what you need.

There are a couple of things that jump out.

When you iterate through i, you are actually counting from 0-149 instead of 1-150. I’m not sure if this is what you want or not- I haven’t seen the range function used that way before.

When you evaluate the tag values, you are getting the value of the same tag twice. I would read it once and store it in a temp variable for further use, and that could possibly help.

@ Step7
My tags are tank1, tank2…tank150 for each group.
If i use the iterator, ‘i’ as the tank variable then i can only get 0 to 149(tank0…tank149). However, i need to access tank1…tank150. so i use the other variable, ‘temp[i]’.

Ok, that script is your problem, without a doubt. That script is going to run slowly because it is initiating a separate communication between the client and the gateway for each tag. 150 separate requests. And then you’re binding a label’s text to it using a runScript expression, and that’s the worst part: this means that your script is running on the UI thread, which is what causes the general slowdown of the UI.

My suggestions:

  1. Re-write the script to use system.tag.readAll. This will change it from doing 150 requests to doing 1 request.

  2. Do not bind a label directly to running this script. You want to run this script in the background. Even better - run it on the gateway and store it’s results in a memory tag. Take the script(s) and put them in gateway timer scripts, storing the resulting count in a memory tag, and then bind the labels to the memory tags.

Thank you for the replies…
I used the system.tag.readAll for accessing the tag values and that has considerably improved the performance…
I still have a problem with the tag going to bad quality periodically. when i start my server machine, the ignition serer also starts, it shows it is connected to the PLCs too, however, the tags keep going to bad quality in a cyclic way. I am communicating using modbus TCP.
But if i disconnect and reconnect the device, then the tag behaves nomally.
I don’t know why tags go to bad quality in the beginning…
looking forward to a solution…

Please open a new topic with the details of your tag quality issues.