Low CPU utilisation and performance issues

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
Rico de Bokx
Posts: 7
Joined: Friday 02 September, 2022 - 17:54

Low CPU utilisation and performance issues

Post by Rico de Bokx »

Hello everyone,

At the moment i am running a pretty simple model but i am running into some performance issues.
Just to explain i already tried optimising my data collection a little bit by not writing data to excel when a atom moves to a new station and am instead recording it internally in a label and then writing it at the end of the process when the atom enters the sink.
However, even when changing what i thought was a major bottleneck with the data wrinting the performance didnt change at all. At the moment it is taking about 1.5 hours to simulate 1 run of 3520 hours.

I looked at my cpu utilisation while the simulation is running and ED is only using 0.5 - 1% of my cpu. Even when looking at individual cores it is no different about 1% for 1 of my 4 cores with hyper threading (i7-6700HQ). Is this normal utilisation? or am I still just writing too often?

As an extra note, I have setup my models very similarly before like this before and had no problems until this one.
I am still pretty much a novice so its not the most flashy model around. :?

Thank you in advance!
Attachments
Bottleneck analysis.mod
(92.03 KiB) Downloaded 310 times
User avatar
MatthijsJongboer
Posts: 198
Joined: Thursday 11 November, 2010 - 14:12

Re: Low CPU utilisation and performance issues

Post by MatthijsJongboer »

Hello Rico,
I tested your model and received the warning that I have no excel attached. But without excel, the model runs 3520 hours in under 2 seconds.
My laptop is pretty good but even with a slow PC, I think it should takes seconds; not 1,5 hours.
I see you write to excel when products enter the sink. Even for the 7000 writes, this should not take that much time.
When you have excel open, do you see the sheet being filled with the label values?
And just to check; you are running at Unlimited speed?
Rico de Bokx
Posts: 7
Joined: Friday 02 September, 2022 - 17:54

Re: Low CPU utilisation and performance issues

Post by Rico de Bokx »

Hi Matthijs,

Sorry for the late reply i have been very busy as of late and forgot to check.
To answer your questions,
With excel open I do see the label values being written.
I am running at unlimited speed, this also occurs when running with the experiment wizard.
I tried attaching the Excel but it is too large now...
I am automatically making calculations to the data being written.
Is it maybe possible that this is slowing it down? I've done that before and had no problems even with larger models with more data.

Thanks for the help it is appreciated! :D
User avatar
MatthijsJongboer
Posts: 198
Joined: Thursday 11 November, 2010 - 14:12

Re: Low CPU utilisation and performance issues

Post by MatthijsJongboer »

I had a closer look at your model and attached an empty excelsheet for writing.
The sink performs 7 writes for 1 entry so 49k writes for the 7000 products entering.
This communication will slow things down considerably but for the test I did, it took 42 seconds.
Your comment: "I am automatically making calculations to the data being written." could be the culprit here.
If each write also triggers things in Excel, I think this is the source of your problem.
To have a better performance, first write all data to tables and at the end of a run, use writeblock to write it to excel.
This will also make sure your calculation trigger is done after this write.
Rico de Bokx
Posts: 7
Joined: Friday 02 September, 2022 - 17:54

Re: Low CPU utilisation and performance issues

Post by Rico de Bokx »

Thanks, Matthijs, I tried stopping the calculations and writing to Excel and the performance indeed improved.

However I can't seem to get the write block working, I also can't find anything about it in the tutorials or the help section of ED is there somewhere that I can find more information on how to get this working?
User avatar
MatthijsJongboer
Posts: 198
Joined: Thursday 11 November, 2010 - 14:12

Re: Low CPU utilisation and performance issues

Post by MatthijsJongboer »

Good to hear that the performance has improved.
If you use the ExcelActiveX atom to copy the data, you can select the option in the Tables tab of the GUI. It is named 'Use seedy option for data transfer'. If you check this, it will write the datablocks to excel.
Post Reply