swap files on usb flash, and samba questions

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

swap files on usb flash, and samba questions

Postby tedm » Fri Jan 25, 2013 5:42 pm

I had samba up and running, but currently it's not (have read the samba pages, but they refer to older startup file locations), (I have the latest systemd / xinetd setup on my dockstar, so am wondering if there are any downsides to the SWAT method mentioned on one of the samba pages?

Also, in the smb.conf file(s) where should I put the public share mount, if I want the whole volume "/on or /home on" and do I have to put an entry in fstab for it? What should that entry look like?

Finally, my dockstar has only 128K, and is usually only using 40-60K, but occasionally 100K. Should I setup a swap file? ( have about 7GB free on an 8GB usb flash drive, and I don't care if it wears out faster because of swap on it. I swap on ssds, and some are 4 years old, with no problems. I like that with a swap file, I don't have to use dd, and can keep the existing system in place, and swapon and swapoff.

What are good utilities to max out the memory to see what a memory crash would do?

Thanks!
tedm
 
Posts: 88
Joined: Tue Jan 01, 2013 1:12 am

Re: swap files on usb flash, and samba questions

Postby WarheadsSE » Fri Jan 25, 2013 6:00 pm

SWAP on FLASH = NO NO NO

Place the point where you want it, but I would not grant samba access to / only /media, or YOUR personal /home.

same config file
systemctl start smbd nmbd
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: swap files on usb flash, and samba questions

Postby tedm » Fri Jan 25, 2013 6:09 pm

Thanks, can you clarify on the flash? If I setup a file, I can keep the file off, unless there's an emergency where I run out of physical ram, then turn on the file, and get a new USB flash drive after, knowing this one is likely degraded.

Also, on the samba, um, it's just for me, why wouldn't I want full access via samba when I don't have ssh or putty access?


$this->bbcode_second_pass_quote('WarheadsSE', 'S')WAP on FLASH = NO NO NO

Place the point where you want it, but I would not grant samba access to / only /media, or YOUR personal /home.

same config file
systemctl start smbd nmbd
tedm
 
Posts: 88
Joined: Tue Jan 01, 2013 1:12 am

Re: swap files on usb flash, and samba questions

Postby WarheadsSE » Fri Jan 25, 2013 7:57 pm

If you make a swapfile, don't make it ridiculous, 512 is WAY more than you will probably ever need, and only turn it on when absolutely necessary.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: swap files on usb flash, and samba questions

Postby tedm » Fri Jan 25, 2013 11:42 pm

Thank you. I have samba up and running, and went from about 45 to 55 processes, and 45k to 55k in use at boot, but samba is working well. Anyone have lower memory footprints with and without samba (with xinetd)? I added the fuse driver as well as SWAT, but haven't yet seen the swat interface, I don't have lynx, so is there another text browser? I don't think I have a web server running, so I'm not sure how to check out my host:901 http port? Perhaps I could save memory by removing the SWAT web config?

I guess that I'm wondering what are the risks of running such a low memory system without swap? I monitor top regularly, but wouldn't mind regular replacing a usb stick if swap would help the little server stay running longer as I do more things with it. The only thing I can think of, other than above, is to remove IPV6 which I don't need, but I haven't gone through the ~55 processes with a fine tooth comb yet either.

Do other docstar users just live with the 128K and when something doesn't run or it crashes, just reboot? Thanks for helping with these arch arm /systemd sysctrl noob questions. I appreciate it.


$this->bbcode_second_pass_quote('WarheadsSE', 'I')f you make a swapfile, don't make it ridiculous, 512 is WAY more than you will probably ever need, and only turn it on when absolutely necessary.
tedm
 
Posts: 88
Joined: Tue Jan 01, 2013 1:12 am

Re: swap files on usb flash, and samba questions

Postby hydro » Sat Jan 26, 2013 9:24 am

$this->bbcode_second_pass_quote('tedm', '
')Do other docstar users just live with the 128K and when something doesn't run or it crashes, just reboot? Thanks for helping with these arch arm /systemd sysctrl noob questions. I appreciate it.

I don't use swap and usually 128 mb is sufficient for my purposes. I have, for example, nfs, vdr, postfix, motion and vsftp (via xinetd) running, but not samba. I experienced programs being killed mainly when compressing large packages with xz or making backups with rsync. This is why I installed zramswap, which compresses parts of data in RAM, if necessary. This is done by creating compressed swap in RAM, which some people find ridiculous. Most of the time it is idle,
$this->bbcode_second_pass_code('', '
[user@alarm ~]$ free -m
total used free shared buffers cached
Mem: 120 110 9 0 11 61
-/+ buffers/cache: 37 82
Swap: 120 14 105
')
but it helps keeping processes from being killed, when necessary (the process then takes longer to finish due to the required compression, but at least it does finish). I don't know if zramswap makes sense if your daemons are permanently low on RAM. If you want to try it, there is a modification to be made on /usr/lib/systemd/scripts/zramctrl
$this->bbcode_second_pass_code('', '
FILENAME == "/proc/cpuinfo" && $1 == "Processor" {
')
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany
Top

Re: swap files on usb flash, and samba questions

Postby moonman » Sat Jan 26, 2013 10:21 am

Some things fail because by default tmp is in ram.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: swap files on usb flash, and samba questions

Postby tedm » Sat Jan 26, 2013 6:43 pm

Thanks, that is helpful info. Here is my free mem:

$this->bbcode_second_pass_code('', ']# free -m
total used free shared buffers cached
Mem: 120 117 2 0 22 58
-/+ buffers/cache: 36 83
Swap: 0 0 0
[root@')

and here is a list of processes running:

PID TTY STAT TIME COMMAND
1 ? Ss 0:01 /usr/lib/systemd/systemd --system --deserialize 18
2 ? S 0:00 [kthreadd]
3 ? S 0:01 [ksoftirqd/0]
5 ? S 0:00 [kworker/u:0]
6 ? S< 0:00 [cpuset]
7 ? S< 0:00 [khelper]
8 ? S 0:00 [kdevtmpfs]
9 ? S< 0:00 [netns]
10 ? S 0:00 [sync_supers]
11 ? S 0:00 [bdi-default]
12 ? S< 0:00 [kintegrityd]
13 ? S< 0:00 [kblockd]
14 ? S< 0:00 [ata_sff]
15 ? S 0:00 [khubd]
16 ? S 0:00 [khungtaskd]
17 ? S 0:00 [kswapd0]
18 ? SN 0:00 [ksmd]
19 ? S 0:00 [fsnotify_mark]
20 ? S< 0:00 [crypto]
30 ? S< 0:00 [orion_spi]
31 ? S 0:00 [kworker/u:1]
35 ? S 0:00 [scsi_eh_0]
36 ? S 0:05 [usb-storage]
38 ? S< 0:00 [ext4-dio-unwrit]
48 ? Ss 0:00 /usr/lib/systemd/systemd-udevd
73 ? Ss 0:03 /usr/lib/systemd/systemd-journald
97 ? S 0:00 [mv_crypto]
114 ? Ss 0:00 /usr/sbin/crond -n
118 ? Ss 0:00 /usr/sbin/sshd -D
119 ? Ss 0:00 /usr/lib/systemd/systemd-logind
121 ? Ss 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofor$
122 ? Ss 0:01 /usr/sbin/syslog-ng -F
133 tty1 Ss+ 0:00 /sbin/agetty --noclear tty1 38400 linux
137 ttyS0 Ss+ 0:00 /sbin/agetty -s ttyS0 115200 38400 9600 vt102
212 ? Ss 0:00 dhcpcd -qL -t 10 eth0
219 ? S 0:00 /usr/sbin/ntpd -s
220 ? Ss 0:00 /usr/sbin/ntpd -s
342 ? S 0:01 [flush-8:0]
401 ? Ssl 0:02 /usr/bin/smbnetfs -f -o allow_other /mnt/smbnet
636 ? Ss 0:00 /usr/sbin/smbd -F
637 ? Ss 0:02 /usr/sbin/nmbd -F
639 ? S 0:00 /usr/sbin/smbd -F
901 ? S 0:03 [kworker/0:0]
3285 ? Ss 0:02 sshd: root@pts/0
3287 pts/0 Ss 0:00 -bash
3352 ? S 0:00 [kworker/0:1]
3365 pts/0 R+ 0:00 ps ax

Anyone see anything that I can remove easily to reclaim free memory?
tedm
 
Posts: 88
Joined: Tue Jan 01, 2013 1:12 am

Re: swap files on usb flash, and samba questions

Postby hydro » Sat Jan 26, 2013 7:18 pm

The programs you are running need 36 mb RAM, so there is no need for swap. If you are worried about the "free 2" read this:
https://wiki.archlinux.org/index.php/FA ... _my_RAM.3F
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: swap files on usb flash, and samba questions

Postby tedm » Sat Jan 26, 2013 9:44 pm

You mean KB, right? I've since added nginx, and php, and oddly, down to 33KB in use by the free -m command, but top showing ~112/128KB used.

$this->bbcode_second_pass_quote('hydro', 'T')he programs you are running need 36 mb RAM, so there is no need for swap. If you are worried about the "free 2" read this:
https://wiki.archlinux.org/index.php/FA ... _my_RAM.3F
tedm
 
Posts: 88
Joined: Tue Jan 01, 2013 1:12 am
Top

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 289 guests