LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 04-02-2012, 05:15 AM   #1
PrayingMantis
LQ Newbie
 
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17

Rep: Reputation: Disabled
Low memory problem


Hi All,

The rootfs on my target is present on the ramdisk, but the memory of my target is very low (64M). Now, when I FTP to my target and try to copy a new file to it, the total free memory gets used up, and my target becomes non-responsive and restarts after few seconds.
The users for my target use WinSCP to copy files to it.

Is there any way so that I can restrict the FTP transfer if there is less memory on my board?

Thanks in advance,
Mantis
 
Old 04-02-2012, 03:14 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,838

Rep: Reputation: 160Reputation: 160
Is there another storage except RAM, such as flash, on your target?
 
Old 04-03-2012, 01:40 AM   #3
PrayingMantis
LQ Newbie
 
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hi nini,

Thanks for the reply.

Yes, there is a compact flash for permanent storage on my board. But the problem is, the files have to be copied to /tmp on my target which is a tmpfs.

Mantis

Last edited by PrayingMantis; 04-03-2012 at 01:41 AM.
 
Old 04-03-2012, 07:02 AM   #4
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
If you platform supports it, you could try to setup quotas: http://www.yolinux.com/TUTORIALS/Lin...ialQuotas.html.

If the quota is exceeded the FTP server should return 553 Disk full - please upload later.
 
Old 04-04-2012, 04:14 AM   #5
PrayingMantis
LQ Newbie
 
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hi cnxsoft,

I could use disk and memory quotas for my users but I think I may face the following problem - Any user of the admin group and start an ftp upload into tmpfs. So, if I have set the memory quota for each user to be (say) 8M, and I'm already running low on memory (<4M for eg), a new user of the same group can login at this point and start the upload, thinking he still can use 8M of the physical memory.

Or is it that, if the minimum quota allocated for a user is not present, he will be denied login?
 
Old 04-04-2012, 03:27 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,838

Rep: Reputation: 160Reputation: 160
If your new file is very big, it is better to save in flash instead of ramdisk. FTP can save file in anywhere you want. The tmpfs is for small and temporary file.
 
Old 04-05-2012, 12:20 AM   #7
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
Hi PrayingMantis,

I'm not sure about the details, I just gave some ideas, you'd have to try if you want to use quotas. Another solution could be to modify the code of your FTP server (or should I say ssh daemon since your users use winscp) to prevent the issue, e.g. check the free space + size of current downloads before starting downloading a new file.

Having said that, mini09 is right: it's a probably better idea to save your files in flash instead.

The only reason to do what you want to do would be to have another binary program which looks for files in /tmp.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for free database that has low memory usage and innodb and memory like engin golden_boy615 Linux - Software 8 05-08-2011 08:05 AM
Memory corruption detected in low memory chris1274 Linux - General 2 08-23-2010 11:27 PM
low memory swap linuxhippy Slackware 1 07-04-2006 03:16 PM
memory low ?? time112852 Linux - Software 8 09-28-2005 10:12 PM
squirrelmail low memory problem pritamG Linux - Software 2 08-08-2005 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration