Bug 329668 - Plasma Theme Cache behaves badly on Live Systems using tmpfs using 240MB Ram
Summary: Plasma Theme Cache behaves badly on Live Systems using tmpfs using 240MB Ram
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kshareddatacache (show other bugs)
Version: 4.11.3
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-06 22:43 UTC by Wolfgang Scheicher
Modified: 2023-02-09 03:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Scheicher 2014-01-06 22:43:05 UTC
On a Live System where the Plasma Theme Cache ends up on tmpfs, the cachefile (which is to my knowledge forced and 80 MB in Size) leads not only to to 80 MB more ram usage, but 240 MB.

So in situations when you have only either a readonly filesystem or tmpfs this is kinda bad. Especially since a cache like that makes little sense in that situation anyway.

As ugly workaround and for measuring purposes i figured out that replacing the file with a symlink to /dev/zero stops the file from being recreated and using 240 MB ram.
But i have no idea what sideeffects this causes.

Reproducible: Always

Steps to Reproduce:
1. stop kde
2. mount tmpfs on /var/tmp (or wherever your kde caches will be)
3. start kde
4. check the disk usage of the tmpfs and your free ram
5. stop kde
6. replace the theme cache file by a symlink to /dev/null
7. start kde
8. check the disk usage of the tmpfs and your free ram
9. stop kde
10. delete the symlink again and repeate a few times from 3.
Comment 1 Christoph Feck 2014-01-06 23:13:14 UTC
Personally, I use a patched kdelibs, which does not force allocation of space for cache files, but only reserves them using sparse allocation. Not sure if this is an option for live systems.
Comment 2 Michael Pyne 2014-01-07 05:36:51 UTC
The only point to pre-allocating the space is to ensure we don't get trapped by SIGBUS later. It's actually theoretically possible to catch such signals with some threading and setjmp/longjmp magic, but that would require kdelibs (and possibly application) support.

If sparse allocations avoid throwing SIGBUS if the disk ends up filling up (or some other solution to detecting incipient out-of-disk conditions can be found) then sparse allocations would be perfectly fine (ideal even).
Comment 3 Wolfgang Scheicher 2014-01-07 09:35:32 UTC
Actually pre-allocating the space for caches on disk makes sense to me.
But in my opinion the bad things here are:
* pre-allocating the space if the filesystem is on tmpfs or similar
* for some reason using 3x file size in ram when on tmpfs
* have no way of controlling this behaviour (as far as i know)
* forcing 80MB files per theme and user without automatic cleanup

If you switch a theme, only 1x80MB are released and 3x80MB are allocated for the new file. Suppose you are on Machine with 2GB Ram and test KDE in a live system. You find the desktop themes and want to know how they look.
If you try one desktop theme after the other, you compleately fill up your 1GB tmpfs (half the ram is default) by trying 6 different themes and end up with a unusable system without having a clue why.
Comment 4 Andrew Crouthamel 2018-11-11 04:35:44 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Andrew Crouthamel 2018-11-21 04:36:15 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Justin Zobel 2023-01-10 01:52:09 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 7 Bug Janitor Service 2023-01-25 05:05:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2023-02-09 03:54:06 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!