-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misleading documentation on memory usage #27
Comments
Dear William, Since Parmap is implemented by forking the parent process, immediately Of course, if you start using the shared data, making copies, writing to If you have suggestions on how to make the documentation clearer, I'd be 2014-06-04 11:42 GMT+02:00 william3 notifications@github.com:
Roberto Di Cosmo Professeur En delegation a l'INRIA FRANCE. Twitter: http://twitter.com/rdicosmoAttachments: http://www.gnu.org/philosophy/no-word-attachments.htmlOffice location: Bureau 320 (3rd floor) Metro Bibliotheque Francois Mitterrand, ligne 14/RER CGPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 |
Thanks for your feedback. I used top, which is actually tricky. I have 8GB RAM. My process is actually 1.5GB. with 6 cores, top indicates 5 subprocesses using "1.5GB". Very quickly after subprocesses are launched, my disk starts to swap! While theroretically this should not happen, as 1.5 < 8. I tried to use "Gc.compact ()", because I thought that maybe each subprocesses were using some extra garbage internal memory, but it did not change the problem. |
One should be also careful to check what other process is eating up
before and after launching the process, to check what goes on. For example, a web browser with many tabs open can easily eat up more than 1 Gb all by itself. On Wed, Jun 04, 2014 at 06:27:41AM -0700, william3 wrote:
Roberto Di Cosmo Professeur En delegation a l'INRIA FRANCE. Twitter: http://twitter.com/rdicosmoAttachments: http://www.gnu.org/philosophy/no-word-attachments.htmlOffice location: Bureau 3020 (3rd floor) Metro Bibliotheque Francois Mitterrand, ligne 14/RER CGPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 |
ok I have 5GB free, so it is still much biger than 1.5GB. |
Ok, now, again, it all depends on what you program do: if you On Wed, Jun 04, 2014 at 6:37:52AM -0700, william3 wrote:
Roberto Di Cosmo Professeur En delegation a l'INRIA FRANCE. Twitter: http://twitter.com/rdicosmoAttachments: http://www.gnu.org/philosophy/no-word-attachments.htmlOffice location: Bureau 3020 (3rd floor) Metro Bibliotheque Francois Mitterrand, ligne 14/RER CGPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 |
Notice also that your program will need memory space to allocate On Wed, Jun 04, 2014 at 06:37:52AM -0700, william3 wrote:
Roberto Di Cosmo Professeur En delegation a l'INRIA FRANCE. Twitter: http://twitter.com/rdicosmoAttachments: http://www.gnu.org/philosophy/no-word-attachments.htmlOffice location: Bureau 3020 (3rd floor) Metro Bibliotheque Francois Mitterrand, ligne 14/RER CGPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 |
Parmap.map takes as input thouthands of "big data" (maybe 1MB per data), and as output "modified big data". So maybe the "modify" operation just creates what you call "copy on write". |
Ok, let me try to explain what I believe is happening. Imagine you have 1.5G of data at the beginning, and you run List.map on it, and When you use Parmap, you need to count an extra 1.5G for the temporary So in the best case, your program will eat up 4.5G, and probably some As a rule of thumb, when running Parmap.map on data of size X to get a result On Wed, Jun 04, 2014 at 07:13:30AM -0700, william3 wrote:
Roberto Di Cosmo Professeur En delegation a l'INRIA FRANCE. Twitter: http://twitter.com/rdicosmoAttachments: http://www.gnu.org/philosophy/no-word-attachments.htmlOffice location: Bureau 3020 (3rd floor) Metro Bibliotheque Francois Mitterrand, ligne 14/RER CGPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 |
the documentation says : "By forking the parent process on a sigle machine, the children get access, for free, to all the data structures already built"
However, forking a process with 4GB of memory with ncores=3, generates 2 additional subprocesses, with 4GB of memory, which leads to actually 12GB used.
The documentation is I think misleading on this matter.
Best regards
The text was updated successfully, but these errors were encountered: