N00b question about TRY_CACHE and memory use

4 views
Skip to first unread message

max

unread,
Aug 2, 2015, 2:00:00 AM8/2/15
to Tachyon Users
Hi,

I have just deployed a Tachyon cluster on and started playing with it. I am trying to write files with TRY_CACHE policy, but got the error message:

WARN 2015-08-01 22:45:16,042 [taskRun_0_17_0] : Fail to cache for: 
java.io.IOException: OutOfSpaceException(message:Failed to allocate space for block! blockId(22684943515648) sizeBytes(8388608))
at tachyon.worker.WorkerClient.requestBlockLocation(WorkerClient.java:376) 
at tachyon.client.TachyonFS.getLocalBlockTemporaryPath(TachyonFS.java:633) 
java.lang.NullPointerException: null
at tachyon.client.FileOutStream.write(FileOutStream.java:229)

What does it mean by "TRY_CACHE"? How is it different from MUST_CACHE if both of them are failing in case of not enough memory. However, the UI shows that only a small amount of memory is used:
Memory Free / Used:185.00 GB / 2245.15 KB
I am wondering what is happening here. In my case, there are many small files which I assume is not the best use case for Tachyon. I wrote files in block size of 32KB. 

Bin Fan

unread,
Aug 2, 2015, 2:39:51 AM8/2/15
to max, Tachyon Users
Hi Max,

Which Tachyon version are you using? and also could you share us the environment of your cluster (e.g., OS, java version)?

- Bin

--
You received this message because you are subscribed to the Google Groups "Tachyon Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tachyon-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

max

unread,
Aug 2, 2015, 3:20:46 AM8/2/15
to Tachyon Users, hlin...@gmail.com
Thanks Bin. I am using Tachyon 0.6.4 and I am running on java 7 in CentOS 6, with 64G memory. I have taken a look at your great explanation on WriteType. My question is: 

1. Does CACHE_THROUGH mean try to cache, AND THEN write to underFS? 
2. When will ASYNC_THROUGH synchronously write to underFS?
3. What should I do if I want to try cache, and write to underFS if that fails?

Thanks a lot.

cc

unread,
Aug 2, 2015, 11:10:45 PM8/2/15
to Tachyon Users, hlin...@gmail.com
Hi, Max

1. Yes. CACHE_THROUGH will first try to cache the data, if cache fails, it will log WARN, no matter whether the cache succeeds, it will then write through to underFS.
2. I suppose it will not synchronously write to underFS.
3. hmm, I think currently there is no such WriteType.

Hope this helps.
Cheng

在 2015年8月2日星期日 UTC+8下午3:20:46,max写道:

max

unread,
Aug 3, 2015, 12:37:49 AM8/3/15
to Tachyon Users, hlin...@gmail.com
Thanks Cheng a lot for the quick answer! After digging into the code a little bit, I have the same understanding. But I guess my third question might be a good feature to have.

cc

unread,
Aug 3, 2015, 9:51:27 PM8/3/15
to Tachyon Users, hlin...@gmail.com
Yeah, Max, could you open a ticket in https://tachyon.atlassian.net, about this feature you suggest and your use case? Thanks. 

在 2015年8月3日星期一 UTC+8下午12:37:49,max写道:

max

unread,
Aug 4, 2015, 1:39:11 PM8/4/15
to Tachyon Users, hlin...@gmail.com
Sure, I will do that. Meanwhile, I am still having the problem of "Failed to allocate space for block" with only a small amount of memory used. I am wondering how Tachyon allocates memory blocks, only on local node ramfs or from remote node as well?

cc

unread,
Aug 4, 2015, 9:29:29 PM8/4/15
to Tachyon Users, hlin...@gmail.com
Tachyon will choose a worker to write the block, and then allocate space in that worker. 

Current strategy of choosing a worker to write a file is to choose local worker if it exists otherwise choose a random worker. So I guess if you have local worker where your Tachyon client is running, your client will always try to write to the local worker. Tachyon Write is a new feature, so I guess the developers may improve the API in the future. 

在 2015年8月5日星期三 UTC+8上午1:39:11,max写道:
Reply all
Reply to author
Forward
0 new messages