I'm starting over and want to maximize performance on a Pi to run node.js.
How can I do this? I only need SSH, Samba, and node.js and I want to know how the memory should be configured.
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.
Sign up to join this communityA good way is to take a minimal image and bolt on the things you need your self.
This 118mb minimal image is hard float compiled so some computational methods should be allot faster and only takes up 14mb of ram after booted. It has a NTP server to stay in synch with time. Read the website on how to configure first boot as none of the extra heavy stuff is included as in the normal distribution.
Some considerations:
Node.js
is already highly optimized made to run as fast as you can provide the resources to make it run. Put it on a slow SD card and you will have poor response, communication with bulky MySQL or Apache pipes/PHP and it will be slow.
PS- Samba is really fat and consumes way too much resources for what SFTP (Included with OpenSSH) can do instead! Or NFS. I know, Windows users.. use FileZilla and create them accounts if you must, login using the address of your Pi, change port to 22 and viola. You are connected, securly and efficiently to the users home directory and with any permissions applied to the group.
If your main focus is to enhance performance you can lower the allocated GPU memory, since you wont be doing graphical tasks.
To achieve this you must define the RAM available to 16MB by editing /boot/config.txt
, and adding:
gpu_mem=16
This ain't the only possibility, but is a good one to start with.