Performance issues
Forum rules
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
Please also read about Troubleshooting USB Issues before posting.
*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***
Please include the following details in any bug report:
* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
Please also read about Troubleshooting USB Issues before posting.
*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***
Please include the following details in any bug report:
* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Performance issues
As discussed in another topic, I have some performance issues. My minipc is based on J4125, memory used is about 40%. Sharpcap always uses about 50% cpu load. If I enable some overlay or stretch histogram to goes upto 60-70% for sharpcap process only. And that is only 16% zoom! 100% is much slower. I've tried firecapture with it's limit to fps for display presentation and it doesn't load CPU that much.
If I enable overlay or histogram stretch fps also drops.
Is it possible to limit view fps(not capture)?
If I enable overlay or histogram stretch fps also drops.
Is it possible to limit view fps(not capture)?
- Attachments
-
- Screenshot 2024-05-26 144326.jpg (190.67 KiB) Viewed 1424 times
- admin
- Site Admin
- Posts: 17545
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Performance issues
Hi,
there's no option at the moment to lower the frame rate further than the automatic management. The performance screenshot above though is really useful, as it shows that the bulk of the time is going into the display update. It may be worth making sure that you have proper graphics drivers installed (rather than relying on the Microsoft basic display adapter) and they are up to date. Also check to see if the option to use graphics card acceleration has been turned off in the first page of the SharpCap settings and turn back on if necessary. Finally, an interesting thing to test in this sort of circumstance is to use a real monitor/keyboard on the PC if you are using a remote connection to see if it is the remote connection that is causing some of the slowdown.
cheers,
Robin
there's no option at the moment to lower the frame rate further than the automatic management. The performance screenshot above though is really useful, as it shows that the bulk of the time is going into the display update. It may be worth making sure that you have proper graphics drivers installed (rather than relying on the Microsoft basic display adapter) and they are up to date. Also check to see if the option to use graphics card acceleration has been turned off in the first page of the SharpCap settings and turn back on if necessary. Finally, an interesting thing to test in this sort of circumstance is to use a real monitor/keyboard on the PC if you are using a remote connection to see if it is the remote connection that is causing some of the slowdown.
cheers,
Robin
Re: Performance issues
Yes, I was using a RDP connection with the real 4k monitor, I lowered rdp resolution to 1400*900, it went WAY better when zooming 16% or 20% with CPU load about 35-40%. So we can say it was mostly fixed.
I was using it this way, but after a few hours while capturing timelapse (no focus, no reticle, no histogram stretch or overlays) it went back to 100% CPU load. I had to kill the sc process to make pc responsive.
I was using it this way, but after a few hours while capturing timelapse (no focus, no reticle, no histogram stretch or overlays) it went back to 100% CPU load. I had to kill the sc process to make pc responsive.
Re: Performance issues
A question. If the app will have an option to limit display button to lower values than 1024MB will it lower display fps?
- admin
- Site Admin
- Posts: 17545
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Performance issues
Hi,
I'm afraid that I don't quite understand the question, sorry. I'm not quite working out what 'limit display to lower values than 1024Mb' means
cheers,
Robin
I'm afraid that I don't quite understand the question, sorry. I'm not quite working out what 'limit display to lower values than 1024Mb' means
cheers,
Robin
Re: Performance issues
There is a memory limit slider in the option from 1024Mb to infitity for livestacking and display. If I set memory limit to 200Mb, will frames be dropped away? Will display fps increase in that case since the frames are dropped? Somehow firecapture manages to implement preview fps limit
- admin
- Site Admin
- Posts: 17545
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Performance issues
Hi,
ah, OK.
No, the memory limit changes are unlikely to affect the display update rate - if you are just watching the image on screen, SharpCap can work with about 3 or 4 frames worth of memory. Having more memory available is really only used significantly when capturing.
If you turn on the option for additional 'Application Performance' logging in the SharpCap logging settings, the program should record information about how the display frame rate limited is deciding to set the display frame rate, which might reveal some useful info. It should be able to drop the displayed frame rate down to 1fps or so in order to keep the application from being bogged down if necessary.
cheers,
Robin
ah, OK.
No, the memory limit changes are unlikely to affect the display update rate - if you are just watching the image on screen, SharpCap can work with about 3 or 4 frames worth of memory. Having more memory available is really only used significantly when capturing.
If you turn on the option for additional 'Application Performance' logging in the SharpCap logging settings, the program should record information about how the display frame rate limited is deciding to set the display frame rate, which might reveal some useful info. It should be able to drop the displayed frame rate down to 1fps or so in order to keep the application from being bogged down if necessary.
cheers,
Robin
Re: Performance issues
Hi, I did some tests with the new version and performance went worse subjectively.
1. I'm getting extremely low performance during solar mosaic, sometimes it is like 8 fps, instead of 80. While normal capture is fine. Of course I'm applying flats in mosaic, but quick capture with flat has about 79-80fps in 12196 and 68-72 in 12311; in mosaic mode, it is about 20-30fps.
2. The overall CPU load is slightly worse. Probably because of additional logging, probably not. It is more comfortable to use older version, as it looks faster in comparison, Ui is snapper (yeah, an irony is that the initial issue was about performance in prev version, can we call it fixed?
), so if I make zoom level to 16%, it is fine to use old version (in comparison).
3. File saving is slower and that is a big issue.
I made some logs, with flats, without flats, in previous version and new version, in mosaic mode and quick capture. Some logs are duplicated, but you can read notes in the filename about what to pay attention to.
Hopefully, we can track this issue.
1. I'm getting extremely low performance during solar mosaic, sometimes it is like 8 fps, instead of 80. While normal capture is fine. Of course I'm applying flats in mosaic, but quick capture with flat has about 79-80fps in 12196 and 68-72 in 12311; in mosaic mode, it is about 20-30fps.
2. The overall CPU load is slightly worse. Probably because of additional logging, probably not. It is more comfortable to use older version, as it looks faster in comparison, Ui is snapper (yeah, an irony is that the initial issue was about performance in prev version, can we call it fixed?
3. File saving is slower and that is a big issue.
I made some logs, with flats, without flats, in previous version and new version, in mosaic mode and quick capture. Some logs are duplicated, but you can read notes in the filename about what to pay attention to.
Hopefully, we can track this issue.
- Attachments
-
- performance.zip
- (611.38 KiB) Downloaded 23 times
- admin
- Site Admin
- Posts: 17545
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Performance issues
Hi,
let's start at the bottom... File saving.
The first thing we need to check on here is if it is your SSD slowing down - almost all SSDs these days store multiple bits per cell. Unfortunately that's way slower than storing a single bit per cell, so SSDs keep a 'fast write' area of single bit per cell, then when stuff is written there it gets slowly transferred to more efficient (but slower) multi-bit-level storage. I've seen cases where that fast area is only ~10% or less of the size of the SSD, and once it fills up, write speed drops massively. In normal use, that's rarely an issue, but solar imaging can create tens of gigabytes of data over just a few minutes, filling up the fast write area and suddenly everything slows down in terms of file saving.
Symptoms of this problem is that saving is initally fast, but as more files are saved, it suddenly slows down so that SharpCap is holding image data in memory, dropping frames and spending time after the capture is complete writing the cached data out to disk. I can see the delayed writing happening in some of your logs.
To get best performance, clear as much space on your SSD as possible, then use the Windows 'Optimise' tool on the SSD to clear free space ready for reuse.
Looking at your point 1, it's possible that the drop to 8fps during mosaic is exactly the same cause - if the drop is only happening during capture and the SSD has run out of fast write space. At other times during mosaic (ie auto-align), a frame rate drop is expected as the disc detection routine takes a fair bit of calculation to run on each frame.
Point 2 is very tricky to cover - the only change from 4.1.12196 that might have a general effect on UI speed is the change from using .NET 7 to .NET 8 - this change came in with 4.1.12221. Bringing in a major update of such a significant component used by SharpCap could in theory have a performance impact - I will test here with identical situations on the older and newer version, just in case.
cheers,
Robin
let's start at the bottom... File saving.
The first thing we need to check on here is if it is your SSD slowing down - almost all SSDs these days store multiple bits per cell. Unfortunately that's way slower than storing a single bit per cell, so SSDs keep a 'fast write' area of single bit per cell, then when stuff is written there it gets slowly transferred to more efficient (but slower) multi-bit-level storage. I've seen cases where that fast area is only ~10% or less of the size of the SSD, and once it fills up, write speed drops massively. In normal use, that's rarely an issue, but solar imaging can create tens of gigabytes of data over just a few minutes, filling up the fast write area and suddenly everything slows down in terms of file saving.
Symptoms of this problem is that saving is initally fast, but as more files are saved, it suddenly slows down so that SharpCap is holding image data in memory, dropping frames and spending time after the capture is complete writing the cached data out to disk. I can see the delayed writing happening in some of your logs.
To get best performance, clear as much space on your SSD as possible, then use the Windows 'Optimise' tool on the SSD to clear free space ready for reuse.
Looking at your point 1, it's possible that the drop to 8fps during mosaic is exactly the same cause - if the drop is only happening during capture and the SSD has run out of fast write space. At other times during mosaic (ie auto-align), a frame rate drop is expected as the disc detection routine takes a fair bit of calculation to run on each frame.
Point 2 is very tricky to cover - the only change from 4.1.12196 that might have a general effect on UI speed is the change from using .NET 7 to .NET 8 - this change came in with 4.1.12221. Bringing in a major update of such a significant component used by SharpCap could in theory have a performance impact - I will test here with identical situations on the older and newer version, just in case.
cheers,
Robin
Re: Performance issues
1. Yeah, I know and I have about 1.2 Tb free. The slowness is between versions. The old one works faster. I always do speed tests with two different SSDs, and the speed is about the same. The issue happens in the new version during capture.
2. Mosaic. It is not about ssds, because quick capture is slow, but NOT THAT slow. Issue happens directly in mosaic mode, looks like some additional calculations are running in the background that load cpu and overall performance drops. The same happens in autofocus, fps drops but thats understandable, we need to calculate histogram, score, etc. But it drops not so much because we don't need to save. However after I close autofocus fps never goes back to 80, it stays at 60, so I have to restart SC completely, camera reconnect doesn't help. Thats another issue, but I have collected logs yet since I can just restart SC every time as a workaround.
3. Framework: can I revert it to 7 in the new version for a test? That could confirm or not if it is a .NET issue
2. Mosaic. It is not about ssds, because quick capture is slow, but NOT THAT slow. Issue happens directly in mosaic mode, looks like some additional calculations are running in the background that load cpu and overall performance drops. The same happens in autofocus, fps drops but thats understandable, we need to calculate histogram, score, etc. But it drops not so much because we don't need to save. However after I close autofocus fps never goes back to 80, it stays at 60, so I have to restart SC completely, camera reconnect doesn't help. Thats another issue, but I have collected logs yet since I can just restart SC every time as a workaround.
3. Framework: can I revert it to 7 in the new version for a test? That could confirm or not if it is a .NET issue