3

I have this problem:

  1. I run some large calculations before going to sleep (or work).
  2. When I return sometimes RAM is already filled and the program starts writing to Disk, which is a problem since then computer becomes almost non responsive, also the button "Interrupt the current operation" doesn't stop mserver.exe from executing a task. This is what I saw 10 mins after I pressed the button "Interrupt the current operation":enter image description here
  3. Not to mention that calculations are probably like 100 or even 1000 times slower when it starts using Disk instead of RAM (so it's pointless anyway).
  4. Another problem is that I was unable to save some variables to file since in Maple I couldn't type anything while mserver.exe was executing a task and after I killed the process mserver.exe I was still unable to save those variables since Maple commands don't work when connection to kernel is lost.

So, my question: can I make it so that mserver.exe won't use Disk at all (I mean from Maple alone, not by disabling page file in Windows) and just stop execution automatically when RAM is full (just like Classic Maple does when it hits 2GB limit)?

Also it would be nice to be able to limit Maple from using processor too much, for example up to 75% or so, so that I could work on that computer without problems.

Robai
  • 197
  • 9

1 Answers1

2

You might experiment with a few of the options available for specifying limits on the Maple (kernel, mserver) engine.

In particular,

--init-reserve-mem=memorysize

(or, possible, the -T option). See here for some more detail: https://www.maplesoft.com/support/help/MapleSim/view.aspx?path=maple

On Linux/OSX you could pass that in a call to the maple script that launches Maple. On MS-Windows you could add that to the command string/Property in the launcher (icon).

You might try setting it to a fraction of your total RAM, eg. 50-75%, and see how it goes. Presumably you'll have some other processes running.

As far as restricting the CPU use goes, that's more of a OS issue. On Linux/OSX you could use the system's nice facility. I don't know what's avaliable on MS-Windows (built-in or 3rd party). You might be able to set the Priority of the running mserver process from the Task Manager. Or you might look at something like the START facility:

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/start

acer
  • 6,671
  • 15
  • 15
  • I'm not sure where I should put that option, but this is what I did: 1) created shortcut to `maplew.exe` and 2) under Target used this: `"C:\Program Files\Maple 2020\bin.X86_64_WINDOWS\maplew.exe" --init-reserve-mem=1000` The result is that application doesn't fully load for number `1000` (is that number in kilobytes?). If I change the number to `10000` then it loads, but then it has no effect on memory usage (eg. I was still able to reach 17GB RAM usage). I guess it limits just the application's interface, not the kernel `mserver.exe` – Robai Aug 21 '22 at 11:53
  • Ok, did more tests and the `-T` option works! I was testing command `CodeTools[Usage](expand((a+b+c+d+e)^80)):`, which says `memory used=112.66MiB, alloc change=125.45MiB`. This `"C:\Program Files\Maple 2020\bin.X86_64_WINDOWS\maplew.exe" -T ,168000` works without error about memory, but this `"C:\Program Files\Maple 2020\bin.X86_64_WINDOWS\maplew.exe" -T ,167000` gives error about memory (I closed/opened application for each test separately). Thank you very much, now I can control this. – Robai Aug 21 '22 at 12:32
  • The important part is that now when it gives error about memory I can still type commands, also I can save all the variables (created before and after error occurred) to file since kernel isn't killed. – Robai Aug 22 '22 at 00:43