LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS file Read and write file operation taking very long time to finish in a particular PC

Hi All

I'm facing an issue (very slow execution) in reading and writing to a TDMS file. It's nearly taking around 23-30 minutes for a file of 108 MB size and index file size of 6 MB. 

PC details:

It's an NI PXI-e controller in chassis with 32 bit Windows 7 OS with 4 GB RAM. This OS was installed nearly 5 years ago (not reinstalled OS or machine not serviced meanwhile). PC is having NI TestStand 2010 SP1 and LabVIEW 2011 SP1.

 

Observation 1:

The same operation works relatively faster in other laptops with the same input file. It takes around ~1.5 to 3.3 minutes (tested with both 32 bit Windows7 OS & 4GB RAM and a laptop with 64 bit Windows7 OS +8GB RAM).

 

Observation 2:

I've checked the slow PC's hard disk C drive (Check disk using Right click on C drive>>Properties>>Tools>>Check error. It says no errors found.

Also, around 100GB space is available in C drive.

Observation 3:

However, there are many other similar TDMS files are stored in this PC with their respective index files (total around 8 GB). This is not the case in other laptops where it's found working faster. I don't know if this has any linkage but I tried the operation by deleting the other files also. But it's the same.

 

Observation 4:

When I monitored the task manager during the VI run, it shows red lines in the charts under CPU performance tab. I've also captured the screenshot where the CPU shows red without running any operation. CPU is not 100% occupied and memory looks available. but show red lines. This definitely appear that something going wrong with CPU.

In the other laptops, there are no red lines with CPU performance.

Observation 5:

TDMS file operation inside the VI uses FOR loop with parallelism using CPU affinity (No. of logical processors =8) in this PC. I'm suspecting if CPU is having issues, is this having any issue with trying parallelism?

any bad sectors in drive or CPU logical processors not really working as affinity says?

 

I've provided screenshots and VI for reference. Please provide me your suggestions or ideas to check this CPU issue.

THANK YOU.

-Krishna

 

 

 

0 Kudos
Message 1 of 6
(2,914 Views)

Hi KSRK,

 

According to the following: (http://www.tomshardware.co.uk/forum/206500-28-windows-task-manager-shows-usage-help)

Red is used by Task Manager to show the amount of CPU that is spent executing kernel code (ring 0). Green is used to show the amount of time spent executing user code (ring 3).

A healthy system showing both will show the green on top of the red.

You can turn off showing the kernel time by going to the Performance tab and, under the view menu, uncheck "show kernel times".

 

So I would not be concerned by the red lines on task manager as they are just an option.

 

Does the laptop have an SSD or a HDD. I would assume since your PXIe controller is 5 years old it most likely has a HDD as SSDs in PXIe 5 years ago was not normal. Having a HDD would mean that it would take much longer for it to read the file from disk in comparison to a SSD or a modern HDD.

 

I would suggest you look at Resource Monitor to see what is casing the issue for you. There is tutorial on how to use it here:

http://www.pcworld.com/article/241677/how_to_use_resource_monitor.html

 

Let me know how you get on


Certified LabVIEW Architect, Certified Professional Instructor

CLA CPI

0 Kudos
Message 2 of 6
(2,856 Views)

hi

Thanks for your suggestions.  I tried the below. Yes, I could see the option for the Kernel Time turn off. 

Red is used by Task Manager to show the amount of CPU that is spent executing kernel code (ring 0). Green is used to show the amount of time spent executing user code (ring 3).
You can turn off showing the kernel time by going to the Performance tab and, under the view menu, uncheck "show kernel times".

A healthy system showing both will show the green on top of the red. 

 

I've also gone through the links shared, it's good information, however, I could not find any clue for the slow behavior.

 

I tried installing CCleaner in the machine, cleared various temporary files and then checked the operation again. No improvement still. PC is very slow for this TDMS file operation (108 MB file size and index file ~6MB).

 

Same operation which takes 3-4 minutes in other laptops takes upto 23- 60 minutes in this slow PC. I'm not sure whether this PC OS needs to be reinstalled or CPU problem or virus issue or PC to be changed etc.

 

This slow PC's configuration (bought around 5 years ago):

1. NI PXIe-8133 embedded controller, with Windows7 32 bit OS. Factory image 1.2.0f1.

2. Intel(R) Core i7 CPU Q820 @1.73 GHz, 4 GB RAM

3. HDD around 100 GB free.

 

I've noticed SQLserver.exe and nictdl5.exe are running in the processes. I tried checking the operation by ending SQLserver.exe but no improvement.

-Krishna

 

 

 

 

 

 

 

0 Kudos
Message 3 of 6
(2,843 Views)

Hi

 

Can you please answer the other part of my question regarding the laptop vs the PXI?

 

Does the laptop have an SSD or a HDD. I would assume since your PXIe controller is 5 years old it most likely has a HDD as SSDs in PXIe 5 years ago was not normal. Having a HDD would mean that it would take much longer for it to read the file from disk in comparison to a SSD or a modern HDD.

 

I would suspect that the issue is down to the HDD on the PXIe. A clean install of the software may help however its not guaranteed it could just be that it is a slower system.


Certified LabVIEW Architect, Certified Professional Instructor

CLA CPI

0 Kudos
Message 4 of 6
(2,833 Views)

hi,

 

thanks for your quick reply.

This is a HDD- Toshiba MK2561GSYN model (read from System Info).

the configuration of this model appear to be similar in performance compared with the other fast running laptops.

 

so, now I'm suspecting whether the HDD performance degraded or the OS is reading the HDD slow. Any software tools available to check the HDD condition? I can quickly troubleshoot further to try this. Thanks.

 

-Krishna

0 Kudos
Message 5 of 6
(2,826 Views)

Since you are running Windows 7 go to System in the Control Panel and look at the "Windows Experience Index"  note the values and run it again and see if the number drops. That will tell you if the computer's hardware performance has changed.

 

Here is my system for comparison...

Ca.PNG

Click on the "Windows Performance Index" and look at the details.

 

Ca.PNG

 Could be your hard drive is failing and requires may retries on every read slowing down its overall performance.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 6
(2,818 Views)