![]() Registered Member ![]()
|
My Laptop has 8GB Ram.
I am making a comic which is quite heavy currently it is at 1.2 GB cache size. About 20 active layers. A4 300 dpi. While working if I reach 1.7 GB the krita cache bar (bottom right) starts turning red and the file crashes while saving and becomes unopenable. (Fortunately I had a backup this time, last time was a big disaster on the same file.) In Photoshop we can use scratch disk to keep working on large files, how do I do the same in Krita?? |
![]() KDE Developer ![]()
|
Check the performance tab in Krita's settings: https://docs.krita.org/en/reference_man ... tings.html
But it will always be possible to go over the limits of your computer, just like it is with photoshop,, so you'll always need to keep track of memory consumption and merge down layers now and then. Additionally, try to trim to image size (in the image menu) now and then to clear content outside your layer boundaries, make sure the memory cache location is writable and that if you're using a computer with an AMD CPU you have the latest version of Krita, because that works around a firmware bug in the random generator on the CPU that prevents Krita from opening scratch files at all. |
![]() Registered Member ![]()
|
As I recall, the default RAM allocation for krita is 50% of system RAM which would be 4GB in your case. So it seems strange that you have problems at 1.7GB.
Can you check what RAM allocation limit you have in Settings -> Configure Krita -> Performance group -> General tab? I think what you call the 'scratch' file is called the Swap file in krita. As well as the advice that Bound gave, in Settings -> Configure Krita -> General group -> Miscellaneous tab, you could try reducing the Undo stack size to maybe 5 or even smaller if you don't mind a low Undo capability. (Every little bit helps.) When you restart your laptop, use the task manager to check how much RAM is being used, That will probably be less than 1.5GB and will include your OS and any other startup utilities and applications that have been rigged to load at startup. So in theory, about 6.5GB should be available for your use. Start krita and use the task manager to see how much RAM is now free. It will be less since krita itself takes up RAM space even when it's doing nothing and that is probably just over 1GB for the krita application. What's left should be available for your krita document/image use if krita is all you're running. Whatever other applications you like to run (email client, browser, Spotify, etc) also take up RAM so you should check total RAM usage with the task manager when these are also running and remember that depending on how many browser tabs and what's in them, the browser RAM usage can grow , sometimes alarmingly. If and when you start to see red on the status bar RAM indicator, use the task manager to see how much RAM is being used and what applications are using how much RAM. Also, hover the cursor over the status bar indicator to see the details of krita's image RAM usage. |
![]() Registered Member ![]()
|
Some clarification
The image RAM usage is coming to 1.3 GB at present. Allocated Ram is 4 GB. I have enabled the SWAB I have reduced the Undo stack size too. Let's see how it goes. Thanks for all the help. |
![]() Registered Member ![]()
|
In Configure Krita > Performance > Memory Limit, the maximum size that Krita will accept is equal to the amount of RAM. I think the user should be allowed to set a higher Memory Limit. The system requirements for Krita say, “RAM: Recommended 4GB or higher.” So it seems likely that some people will try out Krita on low-end systems. Better equipped systems may also have Krita workflows that bump up against a Memory Limit set to the amount of RAM.
It is worth noting that the default value for Krita’s Memory Limit is only 50% of RAM. The user can increase it to 100%, but may not be aware of that option. It would be better to have a higher default. That would spare some users from getting a crash in Krita and losing work. The Memory Limit setting is in the RAM section of Krita’s Performance screen. There are two other settings in that section: Internal Pool and Swap Undo After. Increasing the Memory Limit would allow more space to be allocated to these two items, and still have enough space for Krita’s other memory needs. In modern operating systems such as Windows, applications and many system processes always reference memory by using virtual memory addresses. Typically, a system will allocate on a storage drive, such as a hard disk, a page file to supplement the RAM. The system will use the page file only if it is needed and dynamically adjust the size within set limits. Performance will decrease as paging, between RAM and the drive, increases. But it is a more graceful degradation than “the file crashes while saving and becomes unopenable.” Also, the performance hit will partially depend on the physical device used for the page file. In particular, SSDs are faster than hard disks. Here is a description of the system-managed (default) virtual memory size on Windows 10. A user can instead opt to set a custom initial and maximum virtual memory size. https://docs.microsoft.com/en-us/windows/client-management/determine-appropriate-page-file-size#system-managed-page-files |
![]() KDE Developer ![]()
|
Ah, no, you're forgetting swapping. The memory limit is the limit at which Krita will start using a scratch file, not the limit where Krita will start crashing.
|
![]() Registered Member ![]()
|
Settings > Configure Krita > Performance shows default memory and swap file size limits. The user should consider changing those limits. Users can take into account factors that the Krita authors could not when they set the defaults. An example would be the resource demands from other applications that the user may wish to run at the same time as Krita.
If Krita runs slowly, the user should hover the cursor over the image dimensions in the status bar. A popup will display information about the memory and swap file size that Krita is using. On Windows, a user can invoke Task Manager to further gauge the resource situation. The Performance tab, and it’s linked Resource Monitor tool, may be useful. That said, I think the defaults could be improved. RAM is much faster than a HDD, or even an SSD. A low memory limit would likely increase the use of a swap file even when there is free RAM. The swap file limit should also be increased. Photoshop defaults to a memory limit of 70% of RAM. 2 GB of RAM is the minimum and at least 8 GB is recommended. Krita defaults to a memory limit of 50% of RAM. 2 GB of RAM is the minimum and at least 4 GB is recommended. boudewijn has written that the recommended RAM should be increased. There are available 2-in-1 laptops with a keyboard, pen, and 4 GB of RAM. On those systems, Krita is probably viable for less demanding projects. They might be good systems for an introduction to Krita. I suggest a Krita default memory limit of 70% for the first 6 GB of RAM, and 50% for any additional RAM. The impact of this change would be largest when running on systems with a low amount of RAM. It is easy to saturate the memory of low-end systems by running multiple applications at the same time. To avoid thrashing, users of those systems should exercise caution in what they run. In particular, Krita is optimized for “focused use.” On low-systems, it is best to run Krita when other applications are not using more than a modest amount of memory. In Krita, the default swap file size limit is 4 GB. I suggest that this default should also be increased. The Windows default maximum page file size influences my thoughts on this. I suggest 3X the memory limit, with constraints. One constraint is no more than one-eight the volume size on which the swap file is located. This is a soft constraint; the user can override it. The user can also change to a different volume. Another constraint is that 64 GB is the maximum that Krita allows. (The Krita team should consider increasing the maximum. It may be inadequate for some animations.) Also, the swap file cannot grow past all of the free space on the drive. Hopefully, Krita will catch such an attempt from a failed file allocation return code, alert the user, and not crash. The user could then erase files, close other programs that use temporary space, or take action in Krita to reduce the needed swap file space. For a system with 8 GB of RAM, my formula in an earlier paragraph yields a default memory limit of 5.2 GB. Three times that yields a default swap file limit of 15.6 GB. A little perspective may be useful. In the US, it is possible to buy a 64 GB USB 3 flash drive for less than $10. Increasing the default swap file size limit from 4 GB seems reasonable. |
Registered users: Bing [Bot], Evergrowing, Google [Bot]