maybe you could take a closer look, how your processes growing - for getting
a feeling, if 32mb is enough at all for what you want to do ?
for example:
while true;do sleep 1; echo;echo `date`; ps -eo vsz,rss,comm |sort -rn|head
;done >/tmp/ps.log
ok, you don`t have rss if i understand correctly, but maybe this one-liner
is helpful
----- Original Message -----
From: "zhanglinbao2000" <zha...@16...>
To: <lin...@li...>; <ntf...@li...>;
"Szakacsits Szabolcs" <sz...@si...>; "Yuval Fledel" <yu...@gm...>;
"Yura Pakhuchiy" <pak...@gm...>
Sent: Thursday, November 30, 2006 10:13 AM
Subject: [ntfs-3g-devel] About how to reduce the memory usage of ntfs-3g ,I
want to mount at least 6 partions at the same time ,but my memory is only
32M .I want to modify the code ,need help and experience
> Hello Szaka ,Yuval, Yura ,
>
> Because my memory is few (only 32M) , and my board will run others
> process besides ntfs-3g ,for example , smbd ,upnpd , thttpd ,and our own
> programms .
>
>
> Now , my usb harddisk has 6 ntfs partions , if I only mount one partion
> ,stability of ntfs-3g behaves well which presents the previous mail .
>
> But ,if I mounted 6 ntfs partions , and simultaneity do copy actions , I
> found that , generally ,there are one or two ntfs-3g alive , others are
> killed !
>
> for example , I have 6 partitions , /dev/sda1 .... 6
>
> ntfs-3g /dev/sda1 /share/usb_hdd_1_1
> ntfs-3g /dev/sda2 /share/usb_hdd_1_2
> ................
> ntfs-3g /dev/sda6 /share/usb_hdd_1_6
>
> and share them by using Samba ,
>
> at the same time , copy 500M file into usb_hdd_1_1 , copy 500M file into
> usb_hdd_1_2
> after a while , my windows PC will slow , after a while , I found ,
> others ntfs-3g have been killed ! only one ntfs-3g remains !
>
>
> +++++++++++++
> # df
> Filesystem 1k-blocks Used Available Use% Mounted on
> rootfs 14367 11651 2716 81% /
> /dev/ram0 14367 11651 2716 81% /
> /dev/hda1 38810100 1254644 37555456 3%
> /harddisk/hd~2/data
> /dev/hda2 109888 252 109636 0%
> /harddisk/hd~2/conf
> df: /share/usb_hdd_1_1: Transport endpoint is not connected
> df: /share/usb_hdd_1_2: Transport endpoint is not connected
> df: /share/usb_hdd_1_3: Transport endpoint is not connected
> df: /share/usb_hdd_1_4: Transport endpoint is not connected
> df: /share/usb_hdd_1_6: Transport endpoint is not connected
> ++++++++++++++
>
>
> -------------
> In a word , from code point view , ,how do I modify the code to reduce
> the memory usage of ntfs-3g , or how to optimize it to use few memory ?
> I have enough time to study it ! Once I optimize it successfully , I can
> contribute my code ,meanwhile, I need your help and experience and
> knowledge . Thanks ahead !
>
> bob,
>
>
>
>
>
> ------------------------------------------------------------------------------
>
> FYI :
>
> from my ARM board , get the info from "ps"
>
>
> # ps
> PID Uid Size State Command
> ...................
> 1162 root 3516 S ntfs-3g /dev/sda1 /share/usb_hdd_1_1 -o
> loc
> 1170 root 3516 S ntfs-3g /dev/sda2 /share/usb_hdd_1_2 -o
> loc
> 1178 root 3516 S ntfs-3g /dev/sda3 /share/usb_hdd_1_3 -o
> loc
> 1186 root 3516 S ntfs-3g /dev/sda5 /share/usb_hdd_1_4 -o
> loc
> 1194 root 3516 S ntfs-3g /dev/sda6 /share/usb_hdd_1_5 -o
> loc
> 1202 root 3516 S ntfs-3g /dev/sda7 /share/usb_hdd_1_6 -o
> loc
> ....................
> the Size should be virtual memory . on ARM , I can't the number of
> physical memory of ntfs-3g ,because my "ps" is of busybox ,its functions
> is simple .
>
> But from X86 (ps aux , see RSS volume ), the physical memory of ntfs-3g
> should be 600k ~900k
>
>
>
>
>
>
>
>
>
>
>
> ----- Original Message -----
> From: "zhanglinbao2000" <zha...@16...>
> To: <lin...@li...>; <ntf...@li...>;
> "Szakacsits Szabolcs" <sz...@si...>; "Yuval Fledel"
> <yu...@gm...>; "Yura Pakhuchiy" <pak...@gm...>
> Sent: Thursday, November 30, 2006 2:34 PM
> Subject: [Status Report] milestone about ntfs-3g running on ARM : ntfs-3g
> can cooperate with samba well ,and stability high .
>
>
>> Hello Szaka,Yuval, Yura and other embeded developers ,
>>
>>
>>
>> Now ,ntfs-3g running on ARM , it looks well when cooperate with
>> Samba
>>
>> My configuration is like this :
>>
>>
>>
>> -------------------------------------------------------------------------------------------
>>
>> # cat /proc/cpuinfo
>> Processor : XScale-IXP425/IXC1100 rev 1 (v5b)
>> BogoMIPS : 266.24
>> Features : swp half thumb fastmult edsp
>>
>>
>>
>> Hardware : Intel IXDP425 Development Platform
>> Revision : 0000
>> Serial : 0000000000000000
>>
>> --
>>
>> mem : 32M
>>
>> ----------------------------------------------------
>>
>> -------------------------------------------------------------------
>>
>> # cat /proc/meminfo
>> total: used: free: shared: buffers: cached:
>> Mem: 31137792 30457856 679936 0 421888 22110208
>> Swap: 139821056 7692288 132128768
>> MemTotal: 30408 kB
>> MemFree: 664 kB
>> MemShared: 0 kB
>> Buffers: 412 kB
>> Cached: 19224 kB
>> SwapCached: 2368 kB
>> Active: 18088 kB
>> Inactive: 5312 kB
>> HighTotal: 0 kB
>> HighFree: 0 kB
>> LowTotal: 30408 kB
>> LowFree: 664 kB
>> SwapTotal: 136544 kB
>> SwapFree: 129032 kB
>>
>>
>>
>> -----------------------------------------------------------------
>>
>>
>>
>>
>>
>> Base on my test , stability is very high ,only speed is low especially
>> big size file ,example 2G file
>>
>>
>>
>> Because ntfs-3g don't support setting permission(only 777 ,not changed)
>> ,so you need modify samba source code about permission setting :
>>
>> My Samba Version is 3.0.11 :
>>
>> modify the source/smbd/open.c , if you don't modify , in some samba
>> configuration you only copy a file , but once it exists , you can't
>> overwrite it !
>>
>>
>>
>>
>>
>> For i18n support , general embed board don't support locale and locale is
>> a little complex for ARM embeded development , you'd better use libiconv
>> to support i18n ,
>>
>> please see my mails sent before which describes how to use libiconv stead
>> of locale .
>>
>>
>>
>>
>>
>> ------------------------------
>>
>> /* We only care about matching attributes on file exists and truncate. */
>> if (file_existed && (GET_FILE_OPEN_DISPOSITION(ofun) ==
>> FILE_EXISTS_TRUNCATE)) {
>> #if 0 // maybe you should commment these code to make sure not
>> conflict with ntfs-3g(777) , this step is optional ,depend on your samba
>> configuration .
>> if (!open_match_attributes(conn, fname, existing_dos_mode,
>> new_dos_mode,
>> psbuf->st_mode, mode, &new_mode)) {
>> DEBUG(5,("open_file_shared: attributes missmatch for file %s (%x %x)
>> (0%o, 0%o)\n",
>> fname, existing_dos_mode, new_dos_mode,
>> (int)psbuf->st_mode, (int)mode ));
>> file_free(fsp);
>> errno = EACCES;
>> return NULL;
>> }
>> #endif
>>
>> ------------------------------
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------
>>
>> FYI , my testing result ,
>>
>>
>>
>> I use Benchmark and winthrax to test ntfs-3g and samba , the stability
>> is high ! current time , they have been running 14 hours and no any
>> errors .
>>
>>
>>
>> My testing is that ,
>>
>> 1> ntfs-3g /dev/sda1 /share/usb_hdd_1_1
>>
>> 2> share /share/usb_hdd_1_1 by samba (my version is 3.0.11)
>>
>> 3> you can access \\xx.xx.xx.xx.xx\usb_hdd_1_1 on your windows
>>
>> 4>you can map it into your local disk ,for example Y:
>>
>>
>>
>>
>>
>> Benchmark testing is this :
>>
>> see Benchmark_winthrax_together.jpg
>>
>>
>>
>>
>>
>> ----------------
>>
>>
>>
>> Next step ,
>>
>> following is more heavily loading test :
>>
>>
>>
>> see attachment :Winthrax_heavy_loading_test.jpg
>>
>> Winthrax has been running 16 hours ,has no errors !
>>
>>
>>
>>
>>
>>
>>
>> ----------
>>
>> bob,
>>
>>
>>
>>
>>
>>
>>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> ntfs-3g-devel mailing list
> ntf...@li...
> https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel
|