[Armadillo:08195] Re: ruby on rails 導入でout of memoryとエラーが出る

Takenoshita Koyo email@hidden
2012年 8月 2日 (木) 15:18:03 JST


竹之下です。

RoRのインストール時に、一時的にメモリ不足となるのであれば、
swapを使うと回避できるかもしれません。

microSDカードにswap領域を確保するには、下記のような手順を踏みます。

1. microSDを二つのパーティションに分割し、片方をswapパーティション
   とする
2. mkswapコマンドでswapパーティションを初期化する
3. swaponコマンドでswapを有効にする

例として、2GBのmicroSDを二つのパーティションに分割し、
先頭パーティション(256MB)をswap領域にする場合には、
下記のようになります。

1. microSDを二つのパーティションに分割し、片方をswapパーティション
   とする
[armadillo ~]# fdisk /dev/mmcblk0

The number of cylinders for this disk is set to 35560.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): d
Selected partition 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
 mmcblk0:
 mmcblk0:
Syncing disks.
[email@hidden (ttymxc1) /etc/config]# fdisk /dev/mmcblk0

The number of cylinders for this disk is set to 61120.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-61120, default 1): 
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-61120, default 61120): +256M

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (7815-61120, default 7815): 
Using default value 7815
Last cylinder or +size or +sizeM or +sizeK (7815-61120, default 61120): 
Using default value 61120

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 82
Changed system type of partition 1 to 82 (Linux swap)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
 mmcblk0: p1 p2
 mmcblk0: p1 p2
Syncing disks.

2. mkswapコマンドでswapパーティションを初期化する
[armadillo ~]# mkswap /dev/mmcblk0p1 
Setting up swapspace version 1, size = 256036864 bytes

3. swaponコマンドでswapを有効にする
[armadillo ~]# swapon /dev/mmcblk0p1

※そもそも、64MBのRAMでRoRは動くのでしょうか。。

(2012年08月02日 12:22), taro yama wrote:
> お世話になります
> 鈴木です。
> 
> 以下の様なエラーメッセージがでます。
> 
> RAMDISKの容量を増やしましたが、解決しませんでした。
> 
> 
>  >gem invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0
>>[<c02a8c20>] (dump_stack+0x0/0x14) from [<c00755e0>] >(oom_kill_process+0x7c/0x1cc)
>>[<c0075564>] (oom_kill_process+0x0/0x1cc) from [<c0075d84>] >(out_of_memory+0x188/0x250)
>>[<c0075bfc>] (out_of_memory+0x0/0x250) from [<c0078f50>] >(__alloc_pages_internal+0x3f0/0x428)
>>[<c0078b60>] (__alloc_pages_internal+0x0/0x428) from [<c0078fb0>] >(__alloc_pages+0x14/0x18)
>>[<c0078f9c>] (__alloc_pages+0x0/0x18) from [<c007b118>] >(__do_page_cache_readahead+0x150/0x2d0)
>>[<c007afc8>] (__do_page_cache_readahead+0x0/0x2d0) from [<c007b304>] >(do_page_cache_readahead+0x6c/0x74)
>>[<c007b298>] (do_page_cache_readahead+0x0/0x74) from [<c0072b84>] >(filemap_fault+0x3c0/0x4e8)
>>r7:c28e6000 r6:00000001 r5:c038ba20 r4:00000000
>>[<c00727c4>] (filemap_fault+0x0/0x4e8) from [<c0082010>] >(__do_fault+0x54/0x428)
>>[<c0081fbc>] (__do_fault+0x0/0x428) from [<c008308c>] >(handle_mm_fault+0x130/0x750)
>>[<c0082f5c>] (handle_mm_fault+0x0/0x750) from [<c002dcc4>] >(do_page_fault+0x1b4/0x25c)
>>[<c002db10>] (do_page_fault+0x0/0x25c) from [<c002de74>] >(do_translation_fault+0x7c/0x84)
>>[<c002ddf8>] (do_translation_fault+0x0/0x84) from [<c0028220>] >(do_PrefetchAbort+0x18/0x1c)
>>r6:bea536b4 r5:00000000 r4:ffffffff
>>[<c0028208>] (do_PrefetchAbort+0x0/0x1c) from [<c0028b00>] >(ret_from_exception+0x0/0x10)
>>Exception stack(0xc28e7fb0 to 0xc28e7ff8)
>>7fa0: 42086a48 0000000a 42086a30 >00000000
>>7fc0: 00000001 00000000 bea536b4 00000000 bea53780 42086fd0 400c2208 >bea53780
>>7fe0: 400f2604 bea53450 4004ef2c 4004ef2c 20000010 ffffffff
>>Mem-info:
>>DMA per-cpu:
>>CPU 0: hi: 0, btch: 1 usd: 0
>>Normal per-cpu:
>>CPU 0: hi: 18, btch: 3 usd: 14
>>Active:13031 inactive:437 dirty:0 writeback:0 unstable:0
>>free:388 slab:1237 mapped:6 pagetables:76 bounce:0
>>DMA free:392kB min:188kB low:232kB high:280kB active:7752kB >inactive:0kB present:12192kB pages_scanned:13929 all_unreclaimable? >yes
>>lowmem_reserve[]: 0 51 51
>>Normal free:1160kB min:824kB low:1028kB high:1236kB active:44372kB >inactive:1748kB present:52832kB pages_scanned:22944 >all_unreclaimable? no
>>lowmem_reserve[]: 0 0 0
>>DMA: 0*4kB 1*8kB 0*16kB 0*32kB 0*64kB 1*128kB 1*256kB 0*512kB >0*1024kB 0*2048kB 0*4096kB = 392kB
>>Normal: 50*4kB 18*8kB 1*16kB 1*32kB 0*64kB 0*128kB 1*256kB 1*512kB >0*1024kB 0*2048kB 0*4096kB = 1160kB
>>737 total pagecache pages
>>Swap cache: add 0, delete 0, find 0/0
>>Free swap = 0kB
>>Total swap = 0kB
>>16384 pages of RAM
>>480 free pages
>>1041 reserved pages
>>1237 slab pages
>>29 pages shared
>>0 pages swap cached
>>Out of memory: kill process 1315 (bash) score 1013 or a child
>>Killed process 1322 (gem)
>>Killed
> 
> 
> 
> _______________________________________________
> armadillo mailing list
> email@hidden
> http://lists.atmark-techno.com/cgi-bin/mailman/listinfo/armadillo


-- 
Koyo Takenoshita




armadillo メーリングリストの案内