2009-06-17 09:22:11     cp & memory fragmentation

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-06-17 09:22:11     cp & memory fragmentation

Nikolay Chokoev (IRELAND)

Message: 75888   

 

It seems that 'cp' causes memory fragmentation:

 

root:/> cat /proc/buddyinfo

Node 0, zone      DMA      0      4      0      2      1      0      1      0    0      1      1      1      0      0

root:/> cp /usr/bin/adiembdemo/adiembdemo /mnt/

root:/> cat /proc/buddyinfo

Node 0, zone      DMA      5      9     19     13      3      1      1      1    0      0      1      0      0      0

root:/>

Is there a remedy for that?

Can I use 'cp' without the 'cp' to use RAM?

 

Regards,

Nikolay

QuoteReplyEditDelete

 

 

2009-06-17 09:33:48     Re: cp & memory fragmentation

Mike Frysinger (UNITED STATES)

Message: 75889   

 

it is literally impossible to copy something without using RAM between two storage devices, plus it doesnt really make sense.

 

it might not even be cp causing the fragmentation but rather the filesystem layers.  try using cat to do the copy.

 

cat /some/file > /mnt/foo

QuoteReplyEditDelete

 

 

2009-06-17 09:39:55     Re: cp & memory fragmentation

Robin Getz (UNITED STATES)

Message: 75891   

 

Nikolay:

 

It depends on what kind of file system you are using - if you are using the default initrd - the filesystem is RAM.

 

-Robin

QuoteReplyEditDelete

 

 

2009-06-17 09:59:34     Re: cp & memory fragmentation

Nikolay Chokoev (IRELAND)

Message: 75894   

 

'cat' also causes the same...

QuoteReplyEditDelete

 

 

2009-06-17 10:00:34     Re: cp & memory fragmentation

Nikolay Chokoev (IRELAND)

Message: 75895   

 

I'm running 'rootfs' ro ext2 on MMC card, the /mnt is on unmanaged RAM partition.

QuoteReplyEditDelete

 

 

2009-06-17 11:54:09     Re: cp & memory fragmentation

Robin Getz (UNITED STATES)

Message: 75905   

 

Nikolay:

 

unmanaged ram - means it is going to consume (and fragement) RAM.

 

I think this comes back to the same thing we have suggested - add more ram to your system.

 

-Robin

QuoteReplyEditDelete

 

 

2009-06-17 12:05:17     Re: cp & memory fragmentation

Nikolay Chokoev (IRELAND)

Message: 75909   

 

The new board with more RAM is on the way. Meantime I'm playing with this one

Attachments

    Outcomes