IAM

OPENSOURCEFAN STUDYING
STUDYINGCOMPUTERSCIENCEANDMATH COMPUTERSCIENCE

Check out the latest superpixel benchmark — Superpixel Benchmark (2016) — and let me know your opinion! @david_stutz

SERIES»Working with Ubuntu«

mount.ntfs with 100% CPU Usage, Compile LESS on Ubuntu, Background Scanning of Projects in Netbeans

More Ubuntu problems I cam across. This time: mount.ntfs at 100% CPU usage, how to install a LESS compiler in Ubuntu, and how to handle annoying background scanning in Netbeans.

More Ubuntu stuff:

I recently came across a problem where mounting a NTFS partition causes unwanted high CPU usage. Reading up on the internet, including here, here, here and here, I came to the conclusion that this issues might be caused by different components. For me, two tasks/processes caused the problem:

  • As described here, I used sudo lsof /opt/mounted_ntfs to get a glimpse of what is currently accessed on the NTFS partition. As described in the forum discussion, it turned out to be updatedb.mlocate. A possible workaround is mentioned in the forum: append the NTFS to the PRUNEPATHS variable in /etc/updatedb.conf file.
  • Trashing larger amounts of files on the NTFS partition seems not to be a good idea. For me, gvfsd-trash regularly causes CPU Usage to spike - this seems also to be a known problem.

Overall, reading about the problems of the NTFS driver used by Ubuntu, it seems to be wise simply not to use NTFS if possible.

To get LESS (i.e. lessc), I followed these steps:

  • Install NodeJS and NPM:
    sudo apt-get install nodejs
    sudo apt-get install npm
    

    Later, I noticed that the latest NodeJS following the official documentation:

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
  • Install LESS:
    sudo npm install less
    
  • Compile LESS:
    lessc file.less > file.css
    

Again and again, Netbeans is slowing down my system when background-scanning the open projects. Over the time, I found the following ways to tackle the problem — with a bit of success:

  • Close unnecessary projects (especially large ones).
  • Move build files and data files outside of the project directory.
  • Add build and data directories to the ignored directories using the project properties.
  • Untick "Enable auto-scanning of sources" in the Netbeans settings (under Miscellaneous > Files).

More from »Working with Ubuntu«:

What is your opinion on this article? Did you find it interesting or useful? Let me know your thoughts in the comments below or get in touch with me:

@david_stutz