What can I do to speed up createrepo?

The --cachedir option given by dmourati in his answer will help you, but you should also use --update, especially if you are not replacing all 469 packages at once.

       --update
              If metadata already exists  in  the  outputdir  and  an  rpm  is
              unchanged  (based on file size and mtime) since the metadata was
              generated, reuse the existing metadata rather than recalculating
              it.  In  the  case  of a large repository with only a few new or
              modified rpms this can significantly reduce I/O  and  processing
              time.

In addition, consider making a separate repo for this package if deploying it this way is truly time-sensitive and --update doesn't help enough.


From the createrepo manpage, you'll see an option for a cachedir.

-c --cachedir <path>
              Specify a directory to use as a cachedir. This allows createrepo
              to create a cache of checksums of packages in the repository. In
              consecutive runs of createrepo over the same repository of files
              that  do  not  have  a  complete change out of all packages this
              decreases the processing time dramatically.

I'd start there.

If that didn't speed createrepo up sufficiently, I'd look at SSD or tmpfs.


Have you tried making use of --workers for multi core CPU? Normally I use --workers 4 to spawn 4 threads of createrepo

Tags:

Rpm

Yum