0

I use the workstation predominantly for shell-based virtual screening of new ligands/drugs (which involves algorithm and output evaluation) and molecular dynamics. Virtual screening involves evaluating around 100k-300k ligands each time. I generally split my total ligands into many clusters. Also, I split works and run in multiple terminals (using Tmux), so that the capacity is increased.

As pointed out by one of the forum members @muru in another post, I learnt that I have not optimized my consumption of RAM in the right way. My workstation has 16 cores and 64 GB RAM.

Whenever, I initiate a work my CPU utilization shows as 100 % utilized but my RAM usually consumes only 10 or at max 15 GB. The remaining RAM is never utilized.

My question is:

How can I optimize such that RAM is fully utilized? Is there a way to make processes to be performed with more RAM?

5
  • 2
    In which way would your algorithm benefit from more RAM? Are you performing the same expensive computation multiple times? If so you could potentially cache the results in RAM. What exactly is your CPU doing? Is it burning the CPU cycles for computation or for I/O? Jun 21, 2020 at 14:26
  • @MartinKonrad Yes. I am performing the same expensive computation multiple times. The underlying process is a algorithm (regression optimized) which predicts the binding energy based on the inputs. But the same process is repeated for 2 lakh times. I suppose that the CPU is utilized for solving the regression equation and identifying the predictor binding energy value.. Jun 22, 2020 at 15:18
  • @MartinKonrad It will also be great if you can possibly tell on how to cache the results onto the RAM. Jun 22, 2020 at 15:19
  • Be sure to verify that your application is actually spending a significant amount of time recomputing the same data. You could run it with a profiler like perf to ensure it's actually worth optimizing. How to optimize your code is probably more a question for stackoverflow.com. Jun 22, 2020 at 15:28
  • I’m voting to close this question because (a) it is a programming-related question and should be posted on SO, and (b) without detailed information is not likely to be answerable even there.
    – AdminBee
    Nov 13 at 13:22

1 Answer 1

0

The key to optimizing an application is to understand where the bottlenecks are. In your case, computation speed seems to be the bottleneck since the RAM is not limiting you. You then have to ask whether or not your program benefits from having more RAM available, a few useful questions to ask yourself are:

  • Is my program computing the same (relatively long) things multiple time ?

If so you can use the power of dynamic programming to cache the result of the long computations and thus improve your computation speed

  • Is my program regularly reading/writing to the disk ?

If your read/writes are always on the same files, Linux will automatically cache/buffer them to improve the speed, but if you are reading from multiple files, or in an unpredictable way, it may be a good idea to pull all the data you will need from the disk into the RAM, carry out all the calculations on the data stored in the RAM and finally write everything to the disk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .