Welcome! Log In Create A New Profile

Advanced

Re: nginx-devel Digest, Vol 39, Issue 27

Aliaksandr Valialkin
January 23, 2013 12:42PM
On Wed, Jan 23, 2013 at 2:00 PM, Igor Sysoev <igor@sysoev.ru> wrote:
>
> > - unlike nginx's file-based cache, stores all cached data in two files -
> one file is used for index, while the other file is used for cached data.
> These files aren't vulnerable to fragmentation, since their sizes never
> change after the application start.
>
> Well it eliminates the cache file fragmentation on file system, but how do
> you eliminate
> cached objects fragmentation inside the cache file?
>

Cached objects fragmentation is eliminated by the following mechanisms
build into ybc:
- cached object data always occupies a single contiguous memory region.
- cached objects are stored in a circular log. So newly objects may only
overwrite the oldest objects stored in the log. This way the log cannot
contain holes (except for stale, rolled back or overwritten objects).
- frequently requested objects with sizes smaller than the given threshold
are periodically moved into the log's head. This guarantees that small hot
objects will be always packed into the smallest possible memory region
located near the log's head. Big objects with sizes exceeding multiple
memory pages aren't moved, because there is no much sense in their
defragmentation.


--
Best Regards,

Aliaksandr
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Re: nginx-devel Digest, Vol 39, Issue 27

Aliaksandr Valialkin 1083 January 23, 2013 12:42PM

Re: ybc (was: nginx-devel Digest, Vol 39, Issue 27)

Igor Sysoev 924 January 24, 2013 02:52AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 173
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready