[Openstack] [Swift] When does replicator reclaim objects?
shrinand at maginatics.com
Fri Oct 10 04:17:42 UTC 2014
I have a single node Swift cluster with a replica count of 1. I
recently found that writes to this instance were becoming incredibly
slow due to two types of timeouts:
1) container-server timeout when trying to lock the db.
2) object-server timeout when connecting to the container-server
(saving for async update later).
I suspect this is happening because the sqlite db has grown to be very
large. The .db file the container directory was 1.5GB in size.
I looked at the "objects" table from the container db and it showed it
had >10M entries. 4M out of these had the "deleted" bit set. In order
to reduce the size of the db, I changed the "reclaim_age" option in
the "object-replicator" config to 30 seconds. This setting is
perfectly fine for my use case because there is a single replica.
As per the documentation, the replicator considers a directory for
replication when a new object gets written into it. At that time, the
replicator will also delete objects which have gone past the
reclaim_age. However, even after several thousands of new object
writes, I don't see the ".ts" files being deleted or the container db
entries being removed.
1) Does the replicator delete objects even when there is no
replication involved? E.g. when replica count is 1.
2) Are there other ways to tune the system for objects to be deleted faster?
More information about the Openstack