AllFiles on 'Mac' become empty when I start VS15

Discussion in 'Windows Virtual Machine' started by ZbynekK, Aug 20, 2015.

  1. vasilyz

    vasilyz Parallels Developers

    Messages:
    84
    In PD11 we've set an overall limit on max number of simultaneously open files for PD processes. The limit was intended to fix some crashes when a file descriptor with a value greater than 1024 was used in FD_SET(). And this limit unintentionally affected Shared Folders. So when a guest program like Visual Studio or some other heavy suite opens too many files on Shared Folders, it fails at some point trying to open more files than the limit allows to do. The environment variable we are talking about lets PD to increase this limit. Currently it is unsafe to set this limit higher than 1024 (sometimes you may experience crashes when too many files are open on SharedFolders in this case). But recently we've found a solid solution. We'll release an update soon and it will include this fix. Thank you for the confirmation.
     
    TornikeG likes this.
  2. TornikeG

    TornikeG Junior Member

    Messages:
    12
    Thank you very much for the explanation, it makes sense to me now.
    So far the system is working fine and no crashes have been detected on my machine.
     
  3. John-PaulS

    John-PaulS Bit poster

    Messages:
    2
    That fixed it for me however I needed to increase the limit to 12288. Thanks.
     
  4. ForbesH

    ForbesH Bit poster

    Messages:
    7
    me too (4096)
     
  5. AnthonyB2

    AnthonyB2 Member

    Messages:
    23
    4096 and so far so good - including my one solution with 100 or so projects in it. Glad to be up and running on PD11!
     
  6. JonasB1

    JonasB1 Bit poster

    Messages:
    1
    I needed 8192, works fine now. Thanks!
     
  7. AnthonyB2

    AnthonyB2 Member

    Messages:
    23
    vasilyz, is this fix still necessary in 11.0.2 (31348) and if it's not is it necessary to delete the variable? Or are we OK to leave it in place?
     
    JonasB1 likes this.
  8. AnthonyB2

    AnthonyB2 Member

    Messages:
    23
    I just deleted the env values and it seems to be working OK
     
  9. vasilyz

    vasilyz Parallels Developers

    Messages:
    84
    In 11.0.2 we've eliminated the possibility of crashes (when too many files are open simultaneously) and increased the limit to 4096 (was 512). Now the variable can be removed. But if 4096 is not enough for your tasks, you still have to increase the limit with the variable. Now it is safe to set a high value.
     
  10. AnthonyB2

    AnthonyB2 Member

    Messages:
    23
    Ok thanks - if there's no crash, how would we know if 4096 is not enough for our tasks?
    Most things seem OK for me now (even though 4096 wasn't high enough in the previous minor version) - aside from SQL Server which needs the service restarting after the VM starts up (this might be a completely unrelated issue).
     
  11. vasilyz

    vasilyz Parallels Developers

    Messages:
    84
    I.e., if your guest apps work fine when they open too many files from Shared Folders, then it is enough. But if your guest apps report some kind of errors when open files from Shared Folders, then you have to increase the limit. The crashes is another story.
    I'll try to clarify. There is a limit on maximum number of simultaneously open files for every process in OSX and the process may adjust this limit for itself. In Parallels Desktop the maximum number of files that can be open simultaneously by a guest application from Parallels Shared Folders (\\Mac\<folder>) also bound by this limit (that is set in prl_vm_app process). Some guest apps in particular workloads open too many files from Parallels Shared Folders, reach the limit and start failing. I.e., if we want our guest apps to work fine, we have to increase the limit in prl_vm_app process. There is a default limit we set on startup of prl_vm_app and there is a mechanism to adjust this default by the environment variable we mentioned before. So.
    1) Before PD11 we didn't set the limit and were bound by the OSX default 10k. We sometimes crashed when the count of open files reached 1024. The crash is the FD_SET() problem (it is illegal to call FD_SET() with an FD value higher than 1024).
    2) In 11.0.0-11.0.1 our default limit was 512. This fixed the crashes (since we now didn't have 1024+ FDs), but also affected guest apps that open too many files. Increasing to 1024 might be a sufficient relax for some of the apps. Increasing to higher than 1024 still unsafe due to the crashes.
    3) In 11.0.2 the crash is fixed (possibility of calling FD_SET() with 1024+ FDs had been eliminated) and the default increased from 512 to 4096. That's all we've done.
     
    AnthonyB2 likes this.

Share This Page