Menu

#1 Delays minimized and more

Unstable (example)
closed
None
5
2015-01-18
2013-05-07
No

* Timestamps in debug log
* Useless periodic config update is disabled by default
* Proper config handling, exit if config failed at startup
* max_retry_count is 0 by default
* Don't do last sleep(2) after last retry
* Per-host negative cache for errors ECONNREFUSED and ETIMEDOUT
(adds C++ to build requirements)

There is situation when GUI software in file open dialog try to stat some
history files that were used in that software. And also with retries (guess
how much, yes 3). So when you turned off your NAS box for example, that was
used with smbnetfs previously. And try to save some file in your browser,
it tries to stat dozens of files on that NAS. Each file is tried 3 * 3
times with 2 seconds delay between each try (fortunately, GUI software does
not add delay, only smbnetfs). So, each file will take 18 seconds. And
dozens of such files -- in my case more, than hundred will be 18 seconds *
100 = 30 minutes. That is, the browser will freeze for 30 minutes. It's
obvious, that smbnetfs becomes unusable in such cases.

Suggested patch tries to address such problems by minimizing delays in
smbnetfs. It will cache negative responses from hosts, and will not pass
multiple requests in short periods of time. On each check it cleans cache
for items that are older, than 3 seconds. Currently it works only with 2
errors: connection error and connection timeout -- practically that covers
all hot spots. The patch have received decent testing with unit test and
performance test.

Discussion

  • Aleksey Midenkov

    Delays minimized and more

     
  • Mikhail Kshevetskiy

    I am working on your patch. Some of the changes are already applied, other are in progress. You make the great work. Currently i am thinkin on rewriting of your implemntation of negative cache to pure C

     
  • Mikhail Kshevetskiy

    sorry for very long delay, i was too busy to find a couple of days to work on your patch

     
  • Mikhail Kshevetskiy

    i found several problems in your negcache implementations. You may need exeption handling, also you may not use read lock in check_negcache() as you modify shared data (by_time and by_name maps) in it. This may lead to maps corruption then two or more threads will execute check_negcache() simultaneously

     
  • Mikhail Kshevetskiy

    try smbnetfs-0.6.0. it implements mosts of the features proposed in your patch

     
  • Mikhail Kshevetskiy

    implemented in smbnetfs but a slightly different way

     
  • Mikhail Kshevetskiy

    • status: open --> closed
    • assigned_to: Mikhail Kshevetskiy
    • Group: --> Unstable (example)
     

Log in to post a comment.