简体   繁体   English

限制内存使用Unix

[英]Limit memory usage Unix

I have access to a shared workstation running Linux and have to load in a large .csv file. 我可以访问运行Linux的共享工作站,并且必须加载一个大的.csv文件。 However, I am uncertain how much memory that requires of the system as there will be some overhead and I am not allowed to use more than a specific amount of the memory. 但是,我不确定系统需要多少内存,因为会有一些开销,我不允许使用超过特定数量的内存。

So can I by any means limit the memory usage either inside Matlab or as I start the job itself? 因此,我可以通过任何方式限制Matlab内部或我开始工作本身的内存使用情况吗? Everything need to happen through the terminal. 一切都需要通过终端发生。

I you are using MATLAB R2015 or later you can setup the array size limits in the Preferences: 我使用的是MATLAB R2015或更高版本,您可以在首选项中设置数组大小限制:

http://de.mathworks.com/help/matlab/matlab_env/set-workspace-and-variable-preferences.html http://de.mathworks.com/help/matlab/matlab_env/set-workspace-and-variable-preferences.html

In my opinion it would be a better solution to control the array sizes by your script/function. 在我看来,通过脚本/函数控制数组大小是一个更好的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM