How much memory is necessary for my Windows 10 desktop to run the lessons?

My real question is: If I upgrade my RAM to 16Gb, would I be able to run the course notebooks unmodified?

Now the details:

I’ve setup the environment in my desktop machine. It is a Windows 10 i7 machine with a Nvidia GTX 1060.

I have 8Gb of RAM and the GPU has 6Gb.

When I try to run the first model, I have a Memory Error exception :-(:cry: in the line

   learn = ConvLearner.pretrained(arch, data, precompute=True)

Reducing the batch size to half, I can run the notebook till the end. BTW: I made a mistake. I reduced the sz variable, the size of images. Not the batch size.

The two commands below return True

  torch.cuda.is_available()
  torch.backends.cudnn.enabled

In the task manager, my CPU gets to 100% while running the notebook, but the GPU barely gets to 30%.

1 Like

I’m running with 16Gb and a 4Gb GPU as thats best my PSU could handle.
I’m anticipating the odd issue and haven’t finished the course, so you should be ok. I ran a little batch script to tell me what the GPU was doing - useful to make sure its being used appropriately

16GB is about the minimum for current hardware. If you get a new system today you can expect to start with 32GB or more.

8GB is not much to work with and browser tabs easily take up 2-3GB.

With 16gb you should be able to run any lesson nb without trouble. Generally speaking, it is recommended to have at least twice the video memory amount. For example, I have 16gb of ram and 8gb of vram. This is, however, just a rule of thumb.

Note that, for example, if you have an ultra-fast nvme drive and swap space properly configured, the need for more RAM will be less urgent. Furthermore, as you discovered, memory problems could be alleviated by reducing batch sizes.

1 Like

You didn’t share the error, but this generally would be indicative of there not being enough RAM on the GPU.

You can verify this by running from terminal (before you run the notebook):

nvidia-smi -l

If you see your GPU memory gets filled up, you will know what is happening :wink: In such a case I am afraid your only option would be replacing the GPU. But if you have a GTX1060, I would be comfortable using it for the whole part 1 of the course. Only then if you want to pursue this further might be a good time to invest in something with more RAM.*

EDIT: * I am only saying this as whether you reduce the batch size or not should not have any impact on your learning in the course :wink: But by all means if you feel like adding RAM / replacing the GPU and find it affordable go for it! 1080TI seems to be a popular choice. But if your goal is to run the notebooks unmodified definitely check where the bottleneck is :wink: My money is on the GPU.

Thanks for the answer. I’ll try to upgrade my RAM. I just didn’t want to spend some money in it and fail to run the notebooks.

BTW: I made a mistake above. To make it run, I reduced the sz variable, the size of images. Not the batch size.

I created a .bat - rather than it running all the time from before opening jupyter notebook, I can start/stop as wanted.
I switched to the following line, which updates every 5 seconds and gives loads of info
nvidia-smi dmon -d 5

Just to pitch in, I tried using a machine with 8GB RAM and it could not complete the first course. All the memory would be consumed when trying to train on the dogs/cats exercise.

Not sure about DL excersises but the ML ones run very smoothly…(tried and tested on different datasets…)

Strange. Are you sure you properly set up the swap space?

I did not make any such changes. Can you give a how-to?

System -> Advanced system settings, then follow what you see in the screencaps below.

Once Virtual Memory panel opens, be sure the swap file is on a drive with at least 30-40Gb free, or even better, set it manually at 32gb if you can afford it.

That holds if you have a ssd. If you have a spinning disk, you are bottlenecked and the only viable option is a ram upgrade.

4 Likes

I’ve just upgraded my RAM to 16Gb and could run the unmodified lesson 1 notebook!

With some apps open, my memory got 87% full (13.9Gb).

Thanks for all the replies.

The problem was really with the main RAM. My 1060 6Gb could handle it fine. It was 92% full.

2 Likes