{"id":1997,"date":"2014-11-30T11:26:29","date_gmt":"2014-11-30T19:26:29","guid":{"rendered":"https:\/\/digitalnigel.com\/wordpress\/?p=1997"},"modified":"2014-11-30T11:26:29","modified_gmt":"2014-11-30T19:26:29","slug":"os-x-and-samba","status":"publish","type":"post","link":"https:\/\/digitalnigel.com\/wordpress\/?p=1997","title":{"rendered":"OS X and Samba"},"content":{"rendered":"<p>One basic tenant of being a\u00a0SysAdmin\u00a0is that you must have some form of home server. Whether that&#8217;s an old Atari system that you hacked an ethernet interface onto is irrelevant. Following this tenant, I too run a home server, and one of it&#8217;s functions is to provide large file storage for the network. Archives of photos, music, movies, etc.<\/p>\n<p>Samba is a open source bit of software that helps Linux computers interact with and provide file shares using the same protocol that Windows computers use. Apple originally also included Samba in OS X to support connecting to and providing these shares as well, but though various reasons that don&#8217;t really matter they decided to make their own version.<\/p>\n<p>There has been quite a lot of discussion regarding performance gains\/losses after Apple&#8217;s move to their own software for these services, but I had noticed particular problems after upgrading to OS X 10.9, and those problems continued in 10.10. Accessing shares was at times ludicrously slow, sometimes taking upwards of a minute just to show a directory with a dozen files in it.<\/p>\n<p>However, it wasn&#8217;t the server, Linux or Windows clients were very responsive and worked well. So, it had to be something about how OS X was interacting with the server that caused problems.<\/p>\n<p>Some internet posts suggested forcing a protocol downgrade by specifying &#8216;cifs:\/\/servername\/sharename&#8217; instead of the more usual &#8216;smb:\/\/servername\/sharename&#8217;. I tried this, along with various permutations of config options on the server side to try and get OS X&#8217;s client to perform better. However, none of them seemed to really resolve the issue.<\/p>\n<p>Eventually I found that OS X&#8217;s search function, Spotlight, indexes all connected devices, including network shares, by default. Spotlight was trying to access a million (hyperbole) files at once, and causing any other requests to be significantly delayed.<\/p>\n<p>I&#8217;m not sure why it indexes things by default, but here&#8217;s how I turned it off.<\/p>\n<p>Go to the Apple Menu -&gt; System Preferences -&gt; Spotlight. Click on the Privacy tab, and click the + button to add your Samba share.<\/p>\n<p>Doing this didn&#8217;t immediately stop spotlight from indexing the drive, but after a restart the issue was gone, and it doesn&#8217;t appear to have recurred in the last few days.<\/p>\n<p>Hope this helps the apparently significant number of people facing this (based on the number of people complaining about Samba performance on OS X in the google results).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One basic tenant of being a\u00a0SysAdmin\u00a0is that you must have some form of home server. Whether that&#8217;s an old Atari system that you hacked an ethernet interface onto is irrelevant. Following this tenant, I too run a home server, and &hellip; <a href=\"https:\/\/digitalnigel.com\/wordpress\/?p=1997\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,6],"tags":[],"class_list":["post-1997","post","type-post","status-publish","format-standard","hentry","category-electronics","category-technology"],"_links":{"self":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1997"}],"version-history":[{"count":1,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1997\/revisions"}],"predecessor-version":[{"id":1998,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1997\/revisions\/1998"}],"wp:attachment":[{"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalnigel.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}