public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/23505] index cache: Have a size limit
       [not found] <bug-23505-4717@http.sourceware.org/bugzilla/>
@ 2020-11-12 15:55 ` tromey at sourceware dot org
  2020-11-13 17:29 ` simark at simark dot ca
  2020-11-13 18:31 ` tromey at sourceware dot org
  2 siblings, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2020-11-12 15:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=23505

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
The elfutils debuginfod-client also caches data, and it manages the
cache directory via an expiry time.

The idea is to have a stamp file whose mtime indicates the last time
that the cache was purged.  Then, the client checks the current time,
and after the desired cache lifetime, it goes through the cache
and removes any file whose atime is older than the maximum unused age.
(Two times are used here - one to control the interval between checks
and one to control the maximum age of an unused file.)

Because this code only checks times of files, and because it ignores
errors from unlink, it works fine if the user starts two copies of
the client at the same time.

So, maybe this is a viable solution to gdb's problem.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/23505] index cache: Have a size limit
       [not found] <bug-23505-4717@http.sourceware.org/bugzilla/>
  2020-11-12 15:55 ` [Bug gdb/23505] index cache: Have a size limit tromey at sourceware dot org
@ 2020-11-13 17:29 ` simark at simark dot ca
  2020-11-13 18:31 ` tromey at sourceware dot org
  2 siblings, 0 replies; 3+ messages in thread
From: simark at simark dot ca @ 2020-11-13 17:29 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=23505

--- Comment #2 from Simon Marchi <simark at simark dot ca> ---
I think a size limit is still desirable, as you could debug a lot of stuff in a
short amount of time, and the cache directory could grow too big.  But we could
also delete files if they get too old, even if the size limit is not reached. 
It's probably not useful to keep use disk space for a cache file that's been
unused for a months.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/23505] index cache: Have a size limit
       [not found] <bug-23505-4717@http.sourceware.org/bugzilla/>
  2020-11-12 15:55 ` [Bug gdb/23505] index cache: Have a size limit tromey at sourceware dot org
  2020-11-13 17:29 ` simark at simark dot ca
@ 2020-11-13 18:31 ` tromey at sourceware dot org
  2 siblings, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2020-11-13 18:31 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=23505

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
A couple issues with size limits

- what to do if the limit is reached in a single session?
  a single separate .debug file could be too big.

- how to do it without locking, and without races?
  locking I think is unreliable...

Anyway, I'm not against it, I just don't see how to implement it.

Maybe I'm used to having enough disk space.
I ignore my ~/.cache and today I see it is 1.5G...
if I really need to I can just delete the whole thing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-13 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23505-4717@http.sourceware.org/bugzilla/>
2020-11-12 15:55 ` [Bug gdb/23505] index cache: Have a size limit tromey at sourceware dot org
2020-11-13 17:29 ` simark at simark dot ca
2020-11-13 18:31 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).