<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>the blog of Chris &#187; management</title>
	<atom:link href="http://blog.christophersmart.com/tag/management/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.christophersmart.com</link>
	<description>Fortiter Et Recte</description>
	<lastBuildDate>Wed, 28 Dec 2011 23:39:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Testing yum&#8217;s autoremove orphaned deps feature</title>
		<link>http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/</link>
		<comments>http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 01:53:19 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2349</guid>
		<description><![CDATA[Yesterday I wrote about yum&#8217;s new feature which can automatically remove unused dependencies when a package is uninstalled. Today I got my hands on a suitable build of yum (add the yum-rawhide repo and set clean_requirements_on_remove=1 under [main] in /etc/yum.conf) and I started to test it out on several packages, all of which introduced dependencies. [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I wrote about yum&#8217;s new feature which can <a href="http://blog.christophersmart.com/2010/11/10/yum-gets-autoremove-dependency-feature/">automatically remove unused dependencies</a> when a package is uninstalled.</p>
<p>Today I got my hands on a suitable build of yum (add the <a href="http://repos.fedorapeople.org/repos/james/yum-rawhide/">yum-rawhide repo</a> and set <em>clean_requirements_on_remove=1</em> under <em>[main]</em> in <em>/etc/yum.conf</em>) and I started to test it out on several packages, all of which introduced dependencies. My initial findings? It&#8217;s great.</p>
<p><strong>Single package with dependencies</strong><br />
I started with a single package with several dependencies. When I uninstalled the parent package, yum also removed all of its dependencies which were not needed by any other package (i.e. orphaned dependencies).</p>
<p>Let&#8217;s look at an example; installing Ekiga which pulls in 5 dependencies.<br />
<code><br />
yum install ekiga<br />
...<br />
Installed:<br />
  ekiga.x86_64 0:3.2.7-4.fc14<br />
Dependency Installed:<br />
  evolution-data-server.x86_64 0:2.32.0-3.fc14      libgdata.x86_64 0:0.6.4-4.fc14      libgweather.x86_64 0:2.30.3-1.fc14      opal.x86_64 0:3.6.8-1.fc14<br />
  ptlib.x86_64 0:2.6.7-1.fc14<br />
</code></p>
<p>OK, so we have Ekiga, and we have 5 dependencies installed. What happens if I remove Ekiga?<br />
<code><br />
yum erase ekiga<br />
...<br />
Removed:<br />
  ekiga.x86_64 0:3.2.7-4.fc14<br />
Dependency Removed:<br />
  evolution-data-server.x86_64 0:2.32.0-3.fc14      libgdata.x86_64 0:0.6.4-4.fc14      libgweather.x86_64 0:2.30.3-1.fc14      opal.x86_64 0:3.6.8-1.fc14<br />
  ptlib.x86_64 0:2.6.7-1.fc14<br />
</code></p>
<p>As I was hoping, yum removed all 5 dependencies along with Ekiga itself. Ta da!</p>
<p><em>Result:</em> Tick!</p>
<p><strong>Packages with shared dependencies</strong><br />
I then tested two packages which have shared dependencies. What I would expect is that only the dependencies which are unique to the application being removed, are uninstalled. Other shared dependencies remain, because the other program still requires them and is not being removed.</p>
<p>Let&#8217;s look at an example; mplayer and vlc. Both require the <em>libcaca</em> library and installing both packages pulled in this library.<br />
VLC needs libcaca:<br />
<code><br />
yum deplist vlc |grep libcaca<br />
  dependency: libcaca.so.0()(64bit)<br />
   provider: libcaca.x86_64 0.99-0.10.beta17.fc14<br />
  dependency: libcaca.so.0()(64bit)<br />
   provider: libcaca.x86_64 0.99-0.10.beta17.fc14<br />
</code></p>
<p>And mplayer needs libcaca:<br />
<code><br />
yum deplist mplayer |grep libcaca<br />
  dependency: libcaca.so.0()(64bit)<br />
   provider: libcaca.x86_64 0.99-0.10.beta17.fc14<br />
  dependency: libcaca.so.0()(64bit)<br />
   provider: libcaca.x86_64 0.99-0.10.beta17.fc14<br />
</code></p>
<p>When I want to remove mplayer, yum only removes those mplayer dependencies which vlc does not also require, and leaves the rest (including libcaca).</p>
<p><code><br />
yum erase mplayer<br />
...<br />
Removed:<br />
  mplayer.x86_64 0:1.0-0.119.20100703svn.fc14<br />
Dependency Removed:<br />
  libvdpau.x86_64 0:0.4.1-1.fc14.1                 lzo.x86_64 0:2.03-3.fc12                 mplayer-common.x86_64 0:1.0-0.119.20100703svn.fc14<br />
</code></p>
<p>Note that libcaca was <em>not</em> removed, which is the expected result.</p>
<p><em>Result:</em> Tick!</p>
<p><strong>Removing a package&#8217;s dependency</strong><br />
I then tried to remove a dependency, rather than the parent package. I would expect this to remove all parents which required that package, along with <em>their other</em> dependencies.</p>
<p>Let&#8217;s look at an example, gnash-plugin. This package pulls in three dependencies (including the actual gnash package).</p>
<p><code><br />
yum install gnash-plugin<br />
...<br />
Installed:<br />
  gnash-plugin.x86_64 1:0.8.8-4.fc14<br />
Dependency Installed:<br />
  agg.x86_64 0:2.5-9.fc13                        gnash.x86_64 1:0.8.8-4.fc14                        gtkglext-libs.x86_64 0:1.2.0-10.fc12</code></p>
<p>Now, let&#8217;s see what happens if I try and remove one of the dependencies.</p>
<p><code>yum erase agg<br />
...<br />
Removed:<br />
  agg.x86_64 0:2.5-9.fc13<br />
Dependency Removed:<br />
  gnash.x86_64 1:0.8.8-4.fc14                    gnash-plugin.x86_64 1:0.8.8-4.fc14                    gtkglext-libs.x86_64 0:1.2.0-10.fc12<br />
</code></p>
<p>As you can see, it correctly removed the parent package, which could no-longer operate without the dependency.</p>
<p>This is <strong><em>such</em></strong> a great advancement over remove-leaves, where last time I tried to remove gnash-plugin (after testing it out, I didn&#8217;t want it) yum <a href="http://blog.christophersmart.com/2009/07/13/fedora-removing-unwanted-deps/">wanted to remove Firefox!!</a> Fail.</p>
<p><em>Result:</em> Tick!</p>
<p><strong>Suggestion &#8211; clean up existing system</strong><br />
One thing I would like, is the ability to run a system wide cleanup using this code in yum, rather than other rpm orphan tools. Sort-of like an <em>apt-get autoremove</em>. Theoretically, if you&#8217;ve always removed any packages on your system with this new feature then you should be right, but it would be nice to sort-of do a clean up at any point (on any system) and get yum to remove any orphaned deps for you. Maybe this already exists.</p>
<p>If you want to clean up existing orphaned dependencies, then <em>package-cleanup</em> is your friend (from <em>yum-utils</em>).</p>
<p>Take a look at all the packages that are orphaned, and make sure it is sane.<br />
<code><br />
package-cleanup --leaves<br />
</code></p>
<p>If you&#8217;re happy with the list, you can just remove them all (after you&#8217;ve enabled yum&#8217;s new autoremove feature, of course!):</p>
<p><code><br />
yum erase $(package-cleanup --leaves)<br />
</code></p>
<p>You can instantly see the benefit of this new feature &#8211; on my machine this command also removes <em>brand new</em> orphaned dependencies, created by the orphans I&#8217;m removing! That&#8217;s 59 packages in total.</p>
<p>Without this yum feature, it would only remove 36 packages. You would need to run package-cleanup several times, until you&#8217;ve really removed all orphaned packages.</p>
<p>Similarly, this works for <em>package-cleanup &#8211;orphans</em> but it would be great it this was built into a single <em>yum cleanup</em> type function &#8211; one command to do it all.</p>
<p><strong>Summary</strong><br />
From my initial testing, this <em>works really well</em>, although I&#8217;ll continue to test it and see how we go. Hopefully this will find its way into Fedora 12, 13, and 14 rather than just 15.</p>
<p>I&#8217;m so grateful <a href="http://skvidal.wordpress.com/2010/11/09/orphaned-dep-cleanup-in-yum/">for this work</a> &#8211; it&#8217;s something I&#8217;ve been crying out for ever since I made the decision to stick with Fedora. Thank you, thank you, thank you!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Yum gets autoremove dependency feature</title>
		<link>http://blog.christophersmart.com/2010/11/10/yum-gets-autoremove-dependency-feature/</link>
		<comments>http://blog.christophersmart.com/2010/11/10/yum-gets-autoremove-dependency-feature/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 02:58:01 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[deps]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[leaves]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2330</guid>
		<description><![CDATA[Coming from a Gentoo/Debian background, one thing that has constantly bugged me on RPM based platforms like Fedora is the lack of decent, reliable dependency removal. It seems so simple (and Debian has done it since the dawn of time) &#8211; if I install package x which pulls in dependencies y and z, then when [...]]]></description>
			<content:encoded><![CDATA[<p>Coming from a Gentoo/Debian background, one thing that has constantly bugged me on RPM based platforms like Fedora is the lack of decent, reliable dependency removal.</p>
<p>It seems so simple (and Debian has done it since the dawn of time) &#8211; if I install package <em>x</em> which pulls in dependencies <em>y</em> and <em>z</em>, then when I remove package <em>x</em>, I want to remove dependencies <em>y</em> and <em>z</em>, if they are not required by any other package.</p>
<p>Yes, there is the remove-leaves plugin for Yum and various RPM orphan checking tools, but in my experience, they are <a href="http://blog.christophersmart.com/2009/07/13/fedora-removing-unwanted-deps/">just not reliable</a>.</p>
<p>So, I&#8217;m very happy to have discovered that Seth Vidal has merged <a href="http://skvidal.wordpress.com/2010/11/09/orphaned-dep-cleanup-in-yum/">orphaned dependency cleanup on removal into Yum</a>. Hallelujah!</p>
<p>It&#8217;s in rawhide yum-3.2.28-13, and I&#8217;ll do some testing soon&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2010/11/10/yum-gets-autoremove-dependency-feature/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yum still on the menu?</title>
		<link>http://blog.christophersmart.com/2009/06/24/yum-still-on-the-menu/</link>
		<comments>http://blog.christophersmart.com/2009/06/24/yum-still-on-the-menu/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:15:19 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[comparision]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=876</guid>
		<description><![CDATA[Update: I&#8217;ve tried to post my results back to Seth&#8217;s thread but it won&#8217;t work, so I&#8217;ve emailed him instead. In response to my article comparing Yum and Apt (at least I think it was my article, might have been someone else&#8217;s I guess), lead developer of Yum, Seth Vidal, wrote his own test script [...]]]></description>
			<content:encoded><![CDATA[<p><em>Update: I&#8217;ve tried to post my results back to Seth&#8217;s thread but it won&#8217;t work, so I&#8217;ve emailed him instead.</em></p>
<p>In response to my <a href="http://www.linux-mag.com/id/7382/">article comparing Yum and Apt</a> (at least I think it was my article, might have been someone else&#8217;s I guess), lead developer of Yum, <a href="http://skvidal.wordpress.com/">Seth Vidal</a>, wrote his own test script and performed <a href="http://skvidal.wordpress.com/2009/06/18/yum-benchmarks/">some Yum benchmarks of his own</a>.</p>
<p>He wrote:</p>
<blockquote><p>Always a fun comparison. It’d be even more fun if any of the numbers seemed accurate.</p></blockquote>
<p>His ran his test and concluded that Yum is &#8220;pretty good&#8221; and offers for others to run the test and post their results. So I did, on the same computer I used for the my article. I also compared the results to Ubuntu, as that&#8217;s really what my article was talking about <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So what did I find?</p>
<p><span id="more-876"></span><br />
<strong>Scripts</strong><br />
Firstly, here is the script he wrote:<br />
<a href="http://skvidal.fedorapeople.org/misc/yum-test.sh.txt">http://skvidal.fedorapeople.org/misc/yum-test.sh.txt</a></p>
<p>Here is the script I modified for Ubuntu:<br />
<a href="http://christophersmart.com/files/apt-test.sh">http://christophersmart.com/files/apt-test.sh</a></p>
<p><strong>Preparation</strong><br />
Before running the tests I first deleted all old repo data as I wanted as clean a system as possible. I then ran &#8220;yum check-update&#8221; and &#8220;yum install -y &#8211;downloadonly zziplib-utils&#8221; on Fedora so that I had an up-to-date package database and the files locally. I did the same thing on Ubuntu (but obviously not with &#8220;yum&#8221;).</p>
<p>Then I uninstalled &#8220;yum-plugin-downloadonly&#8221; and &#8220;yum-plugin-download-remove-with-leaves&#8221; and rebooted, so that it would not negatively affect the speed of Yum having to load extra plugins outside of the default.</p>
<p>I also ran the tests in <em>single user mode</em> so that other system processes such as PackageKit would not interfere.</p>
<p>After I had run both scripts, I also re-ran each of the tests <em>individually</em> (which below I call &#8220;freshboot&#8221;), rebooting in between each one so that memory caching would not manipulate the results. After all, running all those commands one after another is bound to overlap and I don&#8217;t think provides an accurate benchmark of each package management component.</p>
<p><strong>Results</strong><br />
Results for Fedora 11 are here, followed by results on a freshboot:<br />
<a href="http://christophersmart.com/files/simple-yum-results.txt">http://christophersmart.com/files/simple-yum-results.txt</a><br />
<a href="http://christophersmart.com/files/simple-yum-results-freshboot.txt">http://christophersmart.com/files/simple-yum-results-freshboot.txt</a></p>
<p>Ubuntu 9.04 results are here, followed by results on a freshboot:<br />
<a href="http://christophersmart.com/files/simple-apt-results.txt">http://christophersmart.com/files/simple-apt-results.txt</a><br />
<a href="http://christophersmart.com/files/simple-apt-results-freshboot.txt">http://christophersmart.com/files/simple-apt-results-freshboot.txt</a></p>
<p><strong>Analysis</strong></p>
<p><em><strong>Search by keyword</strong></em><br />
Yum provided 5 results and took 4.746s<br />
Apt provided 12 results and took 1.366s</p>
<p><em>Apt was 3.47 times faster.</em></p>
<p><em>Fresh boot</em><br />
Yum took 3.380s<br />
Apt took 1.240s</p>
<p><em>Apt was 2.73 times faster.</em><br />
NOTE: I don&#8217;t know why this results were faster on a freshboot, they should be about the same as the first test was on a fresh boot anyway!</p>
<p><strong><em>Search by file provide</em></strong><br />
Yum took 10.654s<br />
Apt took 2.291s</p>
<p><em>Apt was 4.65 times faster.</em><br />
NOTE: I have discovered that running &#8220;yum provides&#8221; builds a cache and so subsequent searches are much faster. Debian has two tools for this, apt-file and dpkg, but dpkg only works for installed packages while apt-file does the entire repository. Also, apt-file needs to be updated like apt-get does, so perhaps a better comparison is needed.</p>
<p><em>Fresh boot</em><br />
Yum took 10.903s<br />
Apt took 2.354s</p>
<p><em>Apt was 4.63 times faster.</em></p>
<p><em><strong>List installed pkgs</strong></em></p>
<p>Yum listed 1,092 packages and took 1.756s<br />
Apt listed 1,188 packages and took 0.191s</p>
<p><em>Apt was 9.19 times faster.</em></p>
<p><em>Fresh boot</em><br />
Yum took 3.924s<br />
Apt took 0.187s</p>
<p><em>Apt was 20.98 times faster.</em></p>
<p><em><strong>Install pkg + deps</strong></em><br />
Yum installed two programs and took 9.775s<br />
Apt installed two programs and took 4.868s</p>
<p><em>Apt was 2.01 times faster.</em><br />
NOTE: I didn&#8217;t install the same program for my tests, but in my article Apt was about 3 times faster.</p>
<p><em>Fresh boot</em><br />
Yum took 14.097s<br />
Apt took 5.671s</p>
<p><em>Apt was 2.49 times faster.</em></p>
<p><em><strong>Removing package</strong></em></p>
<p>Yum took 3.714s<br />
Apt took 2.337s</p>
<p><em>Apt was 1.56 times faster.</em><br />
NOTE: For the tests in my article I used yum with &#8220;&#8211;remove-leaves&#8221;, which checks to see if any other programs requires the dependencies of the package you&#8217;re using and if not, removes those too. This was not done here, which is most likely the cause of the big difference between these and the results in my article. In my article I used tomboy for my tests (after I had removed all mono applications and then re-installed tomboy) which had to remove 7 dependencies. The test used in this script is not really testing all that.</p>
<p><em>Fresh boot</em><br />
Yum took 10.137s<br />
Apt took 4.916s</p>
<p><em>Apt was 2.06 times faster.</em></p>
<p><strong>Conclusion</strong><br />
Seth&#8217;s test seem to confirm my own findings, with the exception of installing and removing packages. Naturally I installed different packages than were used here and I also used the remove-with-leaves plugin for Yum to make it remove no-longer needed dependencies.</p>
<p>These two tests probably caused the most eyebrow raising (as in my article it shows Ubuntu as being 3 and 5 times faster, respectively) but they aren&#8217;t really addressed in Seth&#8217;s script. The results from his script are in Ubuntu&#8217;s favour to a factor of 2.5 and 2, respectively so it&#8217;s not crazily out of proportion. I&#8217;d be interested to see some results on this. Also, a better test for searching by provides would be useful.</p>
<p>Of course it is hard to compare these when they all use different packages and pull in different dependencies. This is why I also had a test to install from a file rather than the database. My test installed Skype via an rpm and deb (ugly I know, but it was the only 3rd party application I could find which provided native packages for both distros), which had zero dependencies and was not in the local database. In my tests Ubuntu was faster than Fedora by a factor of 7. I&#8217;d like to see this included in his script too.</p>
<p>It is interesting to see that Apt is faster still, when running from a fresh boot.</p>
<p>Never-the-less, I would invite any others who wish to test to do so also and let me know how it went. Sure, Yum might have bucket loads more metadata and maybe it can do lots more fancy things, but at the end of the day it still comes in at second place here.</p>
<p>And while I&#8217;m writing all this up, I want to clarify that I&#8217;m not a Yum hater. I do agree with Seth that Yum is &#8220;pretty good&#8221;, but I just wish it would be better. Actually, I also <em>really</em> like Fedora.</p>
<p>As I concluded in my original article, maybe no-one cares how fast or slow their package manager is. Then again, maybe some people do. Personally, I&#8217;d love to see Yum become the best package manager on the planet <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>What I now want to know are all the <em>tweaks and configurations people do to their Yum systems</em> to get better performance. Tips anyone?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/06/24/yum-still-on-the-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

