I bought a notebook with SSD drive and mounted all common system and user temp dirs to memory (to RAM) with tmpfs. This is the list of which dirs are placed in memory exactly (from fstab):
none on /sys/fs/cgroup type tmpfs (rw) udev on /dev type devtmpfs (rw,mode=0755) none on /tmp type tmpfs (rw,nosuid,nodev,size=6G) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) none on /var/cache/apt/archives type tmpfs (rw,noexec,nosuid,nodev,mode=0755) none on /var/tmp type tmpfs (rw,noexec,nosuid,nodev,mode=0755) none on /home/remort/.cache type tmpfs (rw,nosuid,nodev,size=2G)
I use chromium. Its cache should be in tmpfs now (
~/.cache). Now I monitor my disk writes with
cat /proc/interrupts and also with a hdd led on a notebook.
iotop and the interrupts file show many megabytes and thousands of interrupts on disk. Top processes sorted by write operations:
4874 be/4 remort 10.48 M 13.35 M 0.00 % 0.00 % chromium-browser 553 be/3 root 0.00 B 3.30 M 0.00 % 0.08 % [jbd2/sda1-8] 4877 be/4 remort 2.21 M 2.81 M 0.00 % 0.00 % chromium-browser 4875 be/4 remort 0.00 B 1848.00 K 0.00 % 0.00 % chromium-browser 4872 be/4 remort 0.00 B 1524.00 K 0.00 % 0.00 % chromium-browser 4860 be/4 remort 0.00 B 1508.00 K 0.00 % 0.00 % chromium-browser 4862 be/4 remort 4.00 K 1108.00 K 0.00 % 0.00 % chromium-browser 271 be/3 root 0.00 B 924.00 K 0.00 % 0.04 % [jbd2/sdb1-8] 4977 be/4 remort 0.00 B 388.00 K 0.00 % 0.00 % chromium-browser 1455 be/4 root 0.00 B 144.00 K 0.00 % 0.00 % upowerd 675 be/4 syslog 0.00 B 44.00 K 0.00 % 0.00 % rsyslogd -c5
ahci, xhci interrupts from
/proc/interrupts during 5 minutes browsing in chromium:
40: 1 15 5413 52429 PCI-MSI-edge xhci_hcd 41: 6496 1825 8640 11670 PCI-MSI-edge ahci
I mean, of course there should be write operations on disk, but if syslog writes on disk and chromium mostly writes to RAM, why these processes look the same on
iotop output. same with the interrupts file. ahci,xhci interrupts grow when I am browsing the Internet. Am I right about *hci interrupts representing the disk drive devices?
I suppose that it could show that it writes to disk because it writes on filesystem (it doesn't matter that FS is in RAM), but this two tools are quite low level to be filled by filesystem issues.
The hdd led blinks rarely, but blinks sometimes.
(This question is not about chromium. If I use apt-get to upgrade the system, the situation looks the same (apt is in
iotop) but is about how to determine if system writes to Disk or to RAM exactly.)
PS: any suggestions on mount options? more dirs to place to RAM disk ? any SSD optimization tips ?