3

I work as a enterprise Web App developer. Atm, I only work on the server side. I develop EWA using either Java either JavaScript. My development stack includes :

  • Eclipse
  • Maven
  • JoNAS Web Server (or Tomcat)
  • SoapUI
  • NodeJS
  • Sublime Text
  • cURL
  • zsh (for shell scripts).

My machine runs Ubuntu 16.04 LTS using default partitioning scheme for now (as until today I only had 1TG hard drive).

My computer specs summary : https://0bin.net/paste/WrztIvzvGsGl0K1q#AWfh4Bvgnp3WnyjkzGxuLQPWSIf5FuihrUY9s1VPreD

Output of du -sh /* 2> /dev/null

14M   /bin
147M  /boot
184K  /dev
22M   /etc
45G   /home
0     /initrd.img
0     /initrd.img.old
801M  /lib
4,0K  /lib64
16K   /lost+found
16K   /media
16K   /mnt
4,0K  /mnt1
4,0K  /mnt_name
2,4G  /opt
0     /proc
490M  /root
9,7M  /run
14M   /sbin
4,0K  /snap
12K   /soft
4,0K  /srv
0     /sys
112K  /tmp
6,9G  /usr
1,4G  /var
0     /vmlinuz
0     /vmlinuz.old
4,0K  /yourdev-crontab

Today, I received a new SSD drive which is 256GB. So I need to think about my partitioning scheme in order to increase performance if possible.

All my dev stack (except command lines tools) are stored either in /opt or /usr/local folders.

Question is : how should i partition my hard drives so that i benefits from the SSD speed ? (what should i put on the SSD drive what should I put on the 1TG drive ? Should i put my /home folder in the SSD or not ? Should i put the JVM on the SSD or should i use a RAMDISK...)

In summary how to partition my computer to optimize it for Web App Development ?

anchnk
  • 53

2 Answers2

1

I think you can put your /home on your old hard disk. The rest of the system can be put on your new SSD drive.

Alternatively, if you also want to speed up some of the files in the /home directory (maybe some project files), you can put /home on your SSD and mount your HDD under /media.

0

SSD caching with LVM

From the data you provided everything should fit nicely on the SSD with enough free space, your setup probably even fits on half the space. As I wrote in a comment even with packages like Lyx/TeX I don't need more than 30 GB for my root partition except /home.

I assume up until now you had only a root partition that contained all the data and as you said you are currently not using encryption. You can continue running this setup on the SSD and set up lvmcache, dedicating half or less the size of the SSD as a cache for the HDD to help improve reads from the HDD for frequently used blocks. Pairing a 1TB HDD with about 100 GB of Flash storage doesn't seem to be unusual by the way and can be quite a lot, but it depends on your usage patterns.

I recently set up lvmcache myself and posted a Q&A (sorry for the wait) trying to explain the setup as brief and with less hard coded values as possible. Since you don't want encryption you can skip the cryptsetup steps and use the raw devices (/dev/sd*) instead of mapper devices for the encrypted volumes (/dev/mapper/).

Things to consider:

  • SSD caching is a middle ground between entire SSD or HDD storage setups for improved read performance. Write performance is limited to the slowest device which might not always be the HDD (though your SSD is at least one class above my current example).
  • The performance gain depends on your usage pattern, running VMs so far had mostly positive effects for me, but your mileage may vary.
  • Simply treat the HDD with the cache as another data volume mounted to /media as described by Liu. Put all the content you don't need frequently or which has grown to big in /opt, /usr/local or /home on the HDD and symlink to it from the SSD
  • For fast reads and writes you should consider a ramdisk, ccache and the likes.
LiveWireBT
  • 29,597