{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/11241","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/11241/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/11241/comments","events_url":"https://api.github.com/repos/apache/spark/issues/11241/events","html_url":"https://github.com/apache/spark/pull/11241","id":134351407,"number":11241,"title":"[SPARK-13328][Core]: Poor read performance for broadcast variables with dynamic resource allocation","user":{"login":"nezihyigitbasi","id":1223839,"avatar_url":"https://avatars.githubusercontent.com/u/1223839?v=3","gravatar_id":"","url":"https://api.github.com/users/nezihyigitbasi","html_url":"https://github.com/nezihyigitbasi","followers_url":"https://api.github.com/users/nezihyigitbasi/followers","following_url":"https://api.github.com/users/nezihyigitbasi/following{/other_user}","gists_url":"https://api.github.com/users/nezihyigitbasi/gists{/gist_id}","starred_url":"https://api.github.com/users/nezihyigitbasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nezihyigitbasi/subscriptions","organizations_url":"https://api.github.com/users/nezihyigitbasi/orgs","repos_url":"https://api.github.com/users/nezihyigitbasi/repos","events_url":"https://api.github.com/users/nezihyigitbasi/events{/privacy}","received_events_url":"https://api.github.com/users/nezihyigitbasi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2016-02-17T17:47:56Z","updated_at":"2016-03-10T17:22:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/11241","html_url":"https://github.com/apache/spark/pull/11241","diff_url":"https://github.com/apache/spark/pull/11241.diff","patch_url":"https://github.com/apache/spark/pull/11241.patch"},"body":"When dynamic resource allocation is enabled fetching broadcast variables from removed executors were causing job failures and SPARK-9591 fixed this problem by trying all locations of a block before giving up. However, the locations of a block is retrieved only once from the driver in this process and the locations in this list can be stale due to dynamic resource allocation. This situation gets worse when running on a large cluster as the size of this location list can be in the order of several hundreds out of which there may be tens of stale entries. What we have observed is with the default settings of 3 max retries and 5s between retries (that's 15s per location) the time it takes to read a broadcast variable can be as high as ~17m (70 failed attempts * 15s/attempt)"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/194965029","html_url":"https://github.com/apache/spark/pull/11241#issuecomment-194965029","issue_url":"https://api.github.com/repos/apache/spark/issues/11241","id":194965029,"user":{"login":"nezihyigitbasi","id":1223839,"avatar_url":"https://avatars.githubusercontent.com/u/1223839?v=3","gravatar_id":"","url":"https://api.github.com/users/nezihyigitbasi","html_url":"https://github.com/nezihyigitbasi","followers_url":"https://api.github.com/users/nezihyigitbasi/followers","following_url":"https://api.github.com/users/nezihyigitbasi/following{/other_user}","gists_url":"https://api.github.com/users/nezihyigitbasi/gists{/gist_id}","starred_url":"https://api.github.com/users/nezihyigitbasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nezihyigitbasi/subscriptions","organizations_url":"https://api.github.com/users/nezihyigitbasi/orgs","repos_url":"https://api.github.com/users/nezihyigitbasi/repos","events_url":"https://api.github.com/users/nezihyigitbasi/events{/privacy}","received_events_url":"https://api.github.com/users/nezihyigitbasi/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T17:22:20Z","updated_at":"2016-03-10T17:22:20Z","body":"@tgravescs OK made it a config parameter (`spark.block.failures.beforeLocationRefresh` with a default of 5). After we hit this problem I have deployed this fix to production and the failing apps were able to complete successfully."}}