A short review of the latest V-NAND SSD from Samsung – 970 EVO NVMe M.2

 It has been a week since Samsung released its latest NVMe SSD, 970 EVO and 970 PRO. Since the announcement, I was eagerly waiting to get my hands on the 970 EVO. The windows installation on my desktop was running from an old 80 GB HDD. It was OK since I use that installation mainly for mining and for trying out games. Then I stumbled across Universe Sandbox ², an awesome universe simulator. Which made me think about  switching the installation to an SSD. So I thought, why not the latest NVMe drive, and there were two M.2 slots free on my Z370 motherboard.
970_EVO installation
970 EVO in M.2 PCIex4 slot

The first impression was, damn it is too small (M.2-2280 ), smaller than a RAM stick and the performance is mind blowing. 3.5GB/s read and 1.5 GB/s write. Yes, it is big B for byte. You can copy a GB file in less than a second. Samsung upgrades the warranty to 5 years starting with 970 SSD. I have my main Ubuntu installation on a 2.5 inch SATA III 850 EVO, that drive is nowhere close to the gigabyte territory of PCIe. May be I will switch the drives later.
970 evo review
970 EVO uses the latest vertical NAND structure to store bits. Being working on similar technologies, I was quiet intrigued by the design. The bit cell itself looks like a cylinder with rings(the gate wraps around). The bit-line coming through the core vertically and the word-lines by the side in multiple layers (24 layers for first gen, 32 for second gen, 48 for third gen and 64 layers for 970 EVO, fourth generation).  Here is the link to Samsung V-NAND white paper.

v-nand 970 EVO
3D Layout of V-NAND. Image Credit –Chipworks
v-nand._schematic
Schematic

 

 

 

 

 

 

It took 3 days for UPS to deliver to Bangalore, India through regular shipping which I ended up paying 169$ for a 109$ drive including all duties and taxes. I was hopping to spent at least a day to migrate all the installation to the new drive. Samsung surprised me again, In the support page of 970 EVO, you can find ‘Samsung Data Migration’ software which clones the installation which is currently active to the new drive. Just pop-in the drive, install latest NVMe drivers from Samsung support page, open Samsung Data Migration and few clicks to clone the drive. It took just 10 minutes to clone full HDD to NVMe drive and I booted through the new drive directly after clone, that easy. The boot time was just around 10 seconds.

 

Getting started with OpenAI Gym – Part 1, Installation and configuration

OpenAI Gym toolkit provides easy visualisation tools to experiment with reinforcement learning algorithms. Here I will explain the process of setting it up and the issues I have faced.

Installation instructions are given in the github page. While I was trying in the default terminal I was getting issues with python dependencies and different versions of packages installed in the system. So I tried with a virtual environment to set up gym.  First, I have added the Anacaonda path to create a virtual environment.

export PATH="/<installation path>/anaconda3/bin:$PATH"

create virtual environment.

conda create -n py34 python=3.4
source activate py34
git clone https://github.com/openai/gym.git
cd gym
pip install -e .

This will install gym, if you are getting error saying swig not found. Install the dependencies,

sudo apt-get install python python-setuptools python-dev python-augeas gcc swig dialog

Run the sample program.

python
>import gym
>env = gym.make('LunarLander-v2')
>env.reset()
>env.render()

If everything is installed correctly, It will render this frame,

OpenAi gym lunar lander getting started

If there is an error regarding Box2D library, install it manually.

pip3 uninstall Box2D box2d-py
git clone https://github.com/pybox2d/pybox2d
cd pybox2d/
python setup.py clean
python setup.py build
python setup.py install

OpenAI gym needs OpenGL drivers to be configured in the machine. I have got issues with nvidia driver (nvidia-smi). So I tried switching to an older driver. This can be done through ‘Software Updater->Additional Drivers’.

OpenGl driver OpenAI Gym Nvidia

OpenGl driver can be tested by running glxgears  in terminal. If installed correctly, it shows up this image with animation.

OpenAI OPENGL configuration nvidia driver issue

For using MuJoCo physics engine, mujoco-py needs to be installed separately. The instructions are given here. Before running mujoco examples, add these paths to your .bashrc

#mujoco
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/kiran/.mujoco/mjpro150/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia-390
#If there is OpenGL error 
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so:/usr/lib/nvidia-390/libGL.so